Subversion Repositories eFlore/Applications.cel-consultation

Rev

Rev 2 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 3
Line 234... Line 234...
234
		return $chaine_espace_remplaces;
234
		return $chaine_espace_remplaces;
235
    }
235
    }
Line 236... Line 236...
236
    
236
    
Line -... Line 237...
-
 
237
    public static function convertirChaineRequetePourDao($chaine) {
237
    public static function convertirChaineRequetePourDao($chaine) {
238
    	
238
    	
239
    $chaine = str_replace(':', '=', $chaine);
239
    	$chaine = str_replace(':', '=', $chaine);
240
    	$chaine = str_replace(':', '=', $chaine);
Line 240... Line 241...
240
    	$chaine = str_replace('+', '&', $chaine);
241
    	$chaine = str_replace('+', '&', $chaine);
Line 267... Line 268...
267
    	
268
    	
268
    	$chaine = 'taxon:'.self::convertirPourUrl($taxon);
269
    	$chaine = 'taxon:'.self::convertirPourUrl($taxon);
269
    	return $chaine;
270
    	return $chaine;
Line -... Line 271...
-
 
271
    }
-
 
272
    
-
 
273
    public static function convertirChaineTaxonPourAffichage($taxon) {
-
 
274
    	
-
 
275
		if($taxon == 'null') {
-
 
276
    		$taxon = 'indetermine';
-
 
277
    	}
-
 
278
    	
-
 
279
    	$chaine = 'taxon:'.htmlentities($taxon);
-
 
280
    	return $chaine;
270
    }
281
    }
Line 271... Line 282...
271
    
282
    
272
	public static function convertirChaineAuteurPourRequeteUrl($auteur) {
283
	public static function convertirChaineAuteurPourRequeteUrl($auteur) {
273
    	
284
    	
Line 309... Line 320...
309
	    $str = preg_replace('#\&([A-za-z]{2})(?:lig)\;#', '\1', $str); // pour les ligatures e.g. 'œ'
320
	    $str = preg_replace('#\&([A-za-z]{2})(?:lig)\;#', '\1', $str); // pour les ligatures e.g. 'œ'
310
	    $str = preg_replace('#\&[^;]+\;#', '', $str); // supprime les autres caractères
321
	    $str = preg_replace('#\&[^;]+\;#', '', $str); // supprime les autres caractères
Line 311... Line 322...
311
	    
322
	    
312
	    return $str;
323
	    return $str;
-
 
324
	}
-
 
325
 
-
 
326
	public static function estUneRechercheGenerale($chaine_recherche) {
-
 
327
		return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0));
Line 313... Line 328...
313
	}
328
	}
-
 
329
	
-
 
330
	public static function construireUrlFluxRssResultatsRecherche($criteres) {
-
 
331
		
-
 
332
		if(self::estUneRechercheGenerale($criteres)) {
-
 
333
			$parametres = self::convertirChaineRequeteGeneralePourDao($criteres);	
-
 
334
		} else {
-
 
335
			$parametres = self::convertirChaineRequetePourDao($criteres);
314
	
336
 
315
	public static function construireUrlFluxRssResultatsRecherche($criteres) {
337
		}
Line 316... Line 338...
316
		return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.aControleur::convertirChaineRequetePourDao($criteres);
338
		return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.$parametres;
317
	}
339
	}
318
    
340