Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1579 → Rev 1581

/trunk/jrest/services/CoelRecherche.php
115,7 → 115,8
'p' => 'str',
'pr' => 'int',
'str-d' => 'defaut',
'veg' => 'int');
'veg' => 'int',
'projets' => 'int');
$p = $this->traiterParametresUrl(array_keys($params_passes), $param, false);
$this->debug[] = $param;
236,8 → 237,13
}
$where .= 'AND ('.implode(' OR ', $recherche).') ';
}
}
}
if (isset($p['projets'])) {
$where .= "AND cc_ce_projet IN ({$p['projets']}) ".
"AND cs_ce_projet IN ({$p['projets']}) ";
}
$where = str_replace('WHERE AND', 'WHERE', $where);
// Gestion du from en fonction des paramĂȘtres
/trunk/jrest/services/CoelStructure.php
114,7 → 114,7
$info = array();
// PrĂ© traitement des paramĂȘtres
$p = $this->traiterParametresUrl(array('type'), $param);
$p = $this->traiterParametresUrl(array('type', 'projets'), $param);
if (!isset($p['type'])) {
$this->messages[] = "Il est obligatoire d'indiquer type de recherche pour utiliser ce service.";
} else {
126,6 → 126,7
' COUNT( cs_id_structure ) AS nbre '.
'FROM coel_structure '.
'WHERE cs_ce_truk_pays = 2654 '.
(isset($p['projets']) ? " AND cs_ce_projet IN ({$p['projets']}) " : '').
'GROUP BY IF ( SUBSTRING( cs_code_postal FROM 1 FOR 2 ) >= 96, '.
' SUBSTRING( cs_code_postal FROM 1 FOR 3 ), '.
' SUBSTRING( cs_code_postal FROM 1 FOR 2 ) ) '.