Subversion Repositories eFlore/Applications.cel-consultation

Compare Revisions

Ignore whitespace Rev 2 → Rev 3

/trunk/controleurs/aControleur.php
236,6 → 236,7
public static function convertirChaineRequetePourDao($chaine) {
$chaine = str_replace(':', '=', $chaine);
$chaine = str_replace(':', '=', $chaine);
$chaine = str_replace('+', '&', $chaine);
$chaine = str_replace(' ','%20',$chaine);
269,6 → 270,16
return $chaine;
}
public static function convertirChaineTaxonPourAffichage($taxon) {
if($taxon == 'null') {
$taxon = 'indetermine';
}
$chaine = 'taxon:'.htmlentities($taxon);
return $chaine;
}
public static function convertirChaineAuteurPourRequeteUrl($auteur) {
$chaine = 'auteur:'.self::convertirPourUrl($auteur);
311,9 → 322,20
return $str;
}
 
public static function estUneRechercheGenerale($chaine_recherche) {
return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0));
}
public static function construireUrlFluxRssResultatsRecherche($criteres) {
return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.aControleur::convertirChaineRequetePourDao($criteres);
if(self::estUneRechercheGenerale($criteres)) {
$parametres = self::convertirChaineRequeteGeneralePourDao($criteres);
} else {
$parametres = self::convertirChaineRequetePourDao($criteres);
 
}
return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.$parametres;
}
public static function construireIntituleResultatRecherche($criteres) {
/trunk/controleurs/Image.php
56,7 → 56,7
$critere_pour_dao = $_GET['image_recherche'];
if($this->estUneRechercheGenerale($critere_pour_dao)) {
if(aControleur::estUneRechercheGenerale($critere_pour_dao)) {
$critere_pour_dao = aControleur::convertirChaineRequeteGeneralePourDao($critere_pour_dao);
} else {
$critere_pour_dao = aControleur::convertirChaineRequetePourDao($critere_pour_dao);
129,7 → 129,7
$intervalle_max = (($page_en_cours) * $this->limit);
$donnees['url_base_pagination'] = '?module=Image&action=rechercherImage&image_recherche='.$criteres.'&limit='.$this->limit.'&start=';
$donnees['url_base_pagination'] = '?module=Image&action=rechercherImage&image_recherche='.$criteres.'&limit='.$this->limit.'&start=';
$nb_pages = ceil($this->total_resultats/$this->limit);
 
148,14 → 148,8
return $this->getVue('navigation/pagination',$donnees);
}
// +---------------------------------------------------------------------------------------------------------------+
// METHODES POUR LA RECHERCHE DE DONNEES
private function estUneRechercheGenerale($chaine_recherche) {
return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0));
}
// +---------------------------------------------------------------------------------------------------------------+
// METHODES POUR L'AFFICHAGE DE DONNEES
 
private function getUrlImageBase($id, $format = 'L') {