Skip to content
Snippets Groups Projects
Commit 5cde9732 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #75882 indent

parent 38388497
Branches
Tags
3 merge requests!2711Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2,!2707Tessadoc lost pass,!2699Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2
Pipeline #4373 failed with stage
in 36 minutes and 10 seconds
......@@ -52,7 +52,7 @@ class CodifAnnexeLoader extends Storm_Model_Loader {
class Class_CodifAnnexe extends Storm_Model_Abstract {
use Trait_Translator;
const CODE_FACETTE='Y';
const CODE_FACETTE = 'Y';
protected
$_table_name = 'codif_annexe',
......
......@@ -16,11 +16,13 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_CodifCentreInteret extends Storm_Model_Abstract {
const CODE_FACETTE='F';
const CODE_FACETTE = 'F';
protected $_table_name = 'codif_interet';
protected $_table_primary = 'id_interet';
......@@ -28,7 +30,7 @@ class Class_CodifCentreInteret extends Storm_Model_Abstract {
// Transformer en code alpha
$ix=new Class_Indexation();
$recherche=$ix->alphaMaj($recherche);
// Lancer la recherche
if($mode=="1") $condition="like '".$recherche."%'";
if($mode=="2") $condition="like '%".$recherche."%'";
......
......@@ -22,7 +22,7 @@
class Class_CodifEmplacement extends Storm_Model_Abstract {
use Trait_Facetable;
const CODE_FACETTE='E';
const CODE_FACETTE = 'E';
protected $_table_name = 'codif_emplacement';
protected $_table_primary = 'id_emplacement';
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_CodifPcdm4Loader extends Storm_Model_Loader {
......@@ -32,7 +32,7 @@ class Class_CodifPcdm4Loader extends Storm_Model_Loader {
class Class_CodifPcdm4 extends Storm_Model_Abstract {
const CODE_FACETTE='P';
const CODE_FACETTE = 'P';
protected $_table_name = 'codif_pcdm4';
protected $_table_primary = 'id_pcdm4';
......@@ -45,33 +45,33 @@ class Class_CodifPcdm4 extends Storm_Model_Abstract {
{
// Lancer la recherche
$new = '';
if($mode=="1")
if($mode=="1")
{
for($i=0; $i < strlen($recherche); $i++) if($recherche[$i] >="0" and $recherche[$i] <= "9") $new.=$recherche[$i];
$req="select id_pcdm4,libelle from codif_pcdm4 where id_pcdm4 like'".$new."%' order by id_pcdm4 limit ".$limite_resultat;
}
if($mode=="2") $req="select id_pcdm4,libelle from codif_pcdm4 where libelle like'".addslashes($recherche)."%' order by id_pcdm4 limit ".$limite_resultat;
if($mode=="3") $req="select id_pcdm4,libelle from codif_pcdm4 where libelle like'%".addslashes($recherche)."%' order by id_pcdm4 limit ".$limite_resultat;
$resultat=fetchAll($req);
// Mettre l'indice et le libelle
if(!$resultat) return false;
foreach($resultat as $enreg)
{
$liste[]=array($enreg["id_pcdm4"], $this->formatIndice($enreg["id_pcdm4"])." : ".$enreg["libelle"]);
}
return $liste;
}
}
// ----------------------------------------------------------------
// Rend une liste d'indices par niveau
// ----------------------------------------------------------------
static function getIndices($pere)
{
$sql = Zend_Registry::get('sql');
if ($pere == "root")
if ($pere == "root")
$liste=$sql->fetchAll("select * from codif_pcdm4 where LENGTH(id_pcdm4)=1 order by id_pcdm4");
else {
$long=strlen($pere)+1;
......
......@@ -49,7 +49,7 @@ class Class_CodifSectionLoader extends Storm_Model_Loader {
class Class_CodifSection extends Storm_Model_Abstract {
use Trait_Facetable;
const CODE_FACETTE='S';
const CODE_FACETTE = 'S';
protected $_loader_class = 'Class_CodifSectionLoader';
protected $_table_name = 'codif_section';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment