/[openfoncier]/trunk/obj/synchronisationContrainte.class.php
ViewVC logotype

Diff of /trunk/obj/synchronisationContrainte.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4426 by softime, Thu May 26 12:24:04 2016 UTC revision 4427 by softime, Wed Jun 8 07:32:12 2016 UTC
# Line 138  class SynchronisationContrainte { Line 138  class SynchronisationContrainte {
138          }          }
139    
140          // Ouverture du formulaire          // Ouverture du formulaire
141          printf("<form method=\"POST\" action=\"contrainte_synchronisation.php\" name=f2>");          printf("<form method=\"POST\" action=\"\" name=f2>");
142    
143          printf('<input type="hidden" name="valider" id="valider" value="1" />');          printf('<input type="hidden" name="valider" id="valider" value="1" />');
144    
# Line 186  class SynchronisationContrainte { Line 186  class SynchronisationContrainte {
186                  }                  }
187                  break;                  break;
188              default:              default:
189                  # code...                  $correct = false;
190                  break;                  break;
191          }          }
192          return $correct;          return $correct;
# Line 607  class SynchronisationContrainte { Line 607  class SynchronisationContrainte {
607      }      }
608    
609      /**      /**
610       * Récupère l'identifiant d'un ccontrainte par rapport à son numéro       * Récupère l'identifiant d'une contrainte.
611       * @param  string   $numero Identifiant unique de la contrainte sur le SIG       * Le couple numéro/collectivité est unique.
612       * @return integer          Identifiant de la contrainte dans l'application           *
613         * @param   integer  $numero            numéro (unique côté SIG)
614         * @param   integer  $collectivite_idx  clé primaire collectivité
615         * @return  integer                     clé primaire contrainte
616       */       */
617      private function getContrainte($numero, $collectivite_idx) {      private function getContrainte($numero, $collectivite_idx) {
618    
# Line 620  class SynchronisationContrainte { Line 623  class SynchronisationContrainte {
623          $sql = "SELECT contrainte          $sql = "SELECT contrainte
624                  FROM ".DB_PREFIXE."contrainte                  FROM ".DB_PREFIXE."contrainte
625                  WHERE numero = '".$numero."'                  WHERE numero = '".$numero."'
626                  AND om_collectivite = ".$collectivite_idx;                  AND om_collectivite = ".$collectivite_idx."
627                    AND (om_validite_fin > now() OR om_validite_fin IS NULL)
628                    ORDER BY contrainte ASC";
629          $this->f->addToLog("getContrainte() : db->getOne(\"".$sql."\")", VERBOSE_MODE);          $this->f->addToLog("getContrainte() : db->getOne(\"".$sql."\")", VERBOSE_MODE);
630          $contrainte = $this->f->db->getOne($sql);          $contrainte = $this->f->db->getOne($sql);
631          $this->f->isDatabaseError($contrainte);          $this->f->isDatabaseError($contrainte);

Legend:
Removed from v.4426  
changed lines
  Added in v.4427

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26