Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 504 Rev 522
Line 267... Line 267...
267
	}
267
	}
Line 268... Line 268...
268
 
268
 
269
	//+----------------------------------------------------------------------------------------------------------------+
269
	//+----------------------------------------------------------------------------------------------------------------+
Line -... Line 270...
-
 
270
	// GESTION DE MÉTHODES COMMUNES ENTRE LES SERVICES
-
 
271
	
-
 
272
	protected function getUrlImage($id, $format = 'L') {
-
 
273
		$url_tpl = $this->config['settings']['celImgUrlTpl'];
-
 
274
		$id = sprintf('%09s', $id).$format;
-
 
275
		$url = sprintf($url_tpl, $id); 
-
 
276
		return $url;
270
	// GESTION DE MÉTHODES COMMUNES ENTRE LES SERVICES
277
	}
271
	
278
	
272
	protected function encoderMotCle($mot_cle) {
279
	protected function encoderMotCle($mot_cle) {
Line -... Line 280...
-
 
280
		return md5(mb_strtolower($mot_cle));
-
 
281
	}
-
 
282
	
-
 
283
	protected function creerAuteur($courriel, $pourAdmin = false) {
-
 
284
		$auteur = ($pourAdmin) ? $courriel : $this->tronquerCourriel($courriel);
273
		return md5(mb_strtolower($mot_cle));
285
		return $auteur;
274
	}
286
	}
275
	
287
	
276
	protected function tronquerCourriel($courriel) {
288
	protected function tronquerCourriel($courriel) {
Line 290... Line 302...
290
		return $tableau;
302
		return $tableau;
291
	}
303
	}
Line 292... Line 304...
292
	
304
	
293
	protected function nettoyerTexte($txt) {
305
	protected function nettoyerTexte($txt) {
294
		$txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9][a-f]+);)/i', '&', $txt);
306
		$txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9][a-f]+);)/i', '&', $txt);
295
		$txt = preg_replace('/^(?:000null|null)$/i', '', $txt);
307
		$txt = preg_replace('/(?:000null|null)/i', '', $txt);
296
		return $txt;
308
		return $txt;
Line -... Line 309...
-
 
309
	}
-
 
310
	
-
 
311
	protected function etreNull($valeur) {
-
 
312
		$etre_null = false;
-
 
313
		if ($valeur == '' || $valeur == null || $valeur == '000null' || $valeur == 'null') {
-
 
314
			$etre_null = true;
-
 
315
		}
-
 
316
		return $etre_null;
297
	}
317
	}
298
	
318
	
Line 299... Line 319...
299
	//+----------------------------------------------------------------------------------------------------------------+
319
	//+----------------------------------------------------------------------------------------------------------------+
300
	// GESTION DES SQUELETTES PHP
320
	// GESTION DES SQUELETTES PHP