Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1672 → Rev 1673

/trunk/jrest/services/CoelStructure.php
37,7 → 37,9
$type = $param[0];
if ($type == '*' || is_numeric($type)) {
$info = $this->getElementParDefaut($param);
// Pré traitement des paramêtres
$p = $this->traiterParametresUrl(array('id_projet', 'id_structure', 'recherche'), $param);
$info = $this->getElementParDefaut($p);
} else {
$methode = 'getElement'.$type;
if (method_exists($this, $methode)) {
59,13 → 61,10
* ou les _ représentent dans l'ordre : id_projet, id_structure et nom
* Si un des paramêtres est abscent, il prendre la valeur *
*/
public function getElementParDefaut($param) {
public function getElementParDefaut($p) {
// Initialisation des variables
$info = array();
// Pré traitement des paramêtres
$p = $this->traiterParametresUrl(array('id_projet', 'id_structure', 'recherche'), $param);
 
// Construction de la requête
$requete = (($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' cs.*, csc.*, csv.*, '.
' cmhl_date_modification, cmhl_notes, cmhl_source, cmhl_ce_modifier_par, cmhl_ce_etat, cmhl_ip '.
274,7 → 273,8
// Envoie sur la sortie standard
 
if($form_needs_refresh) { // coordonnées mises à jour en DB: en informer le formulaire (si resté ouvert)
// $this->envoyer('reload'); // TODO: handle this
$this->envoyer($this->getElementParDefaut(array('id_structure' => $uid[0])));
exit;
}
$this->envoyer(); // OK par défaut
}