Code Duplication    Length = 5-9 lines in 3 locations

ecrire/inc/config.php 2 locations

@@ 97-101 (lines=5) @@
94
	}
95
96
	// Brancher sur methodes externes si besoin
97
	if ($cfg AND $p=strpos($cfg,'::')){
98
		$methode = substr($cfg,0,$p);
99
		$lire_config = charger_fonction($methode, 'lire_config');
100
		return $lire_config(substr($cfg,$p+2),$def,$unserialize);
101
	}
102
103
	list($table,$casier,$sous_casier) = expliquer_config($cfg);
104
@@ 154-158 (lines=5) @@
151
 */
152
function ecrire_config($cfg,$store) {
153
	// Brancher sur methodes externes si besoin
154
	if ($cfg AND $p=strpos($cfg,'::')){
155
		$methode = substr($cfg,0,$p);
156
		$ecrire_config = charger_fonction($methode, 'ecrire_config');
157
		return $ecrire_config(substr($cfg,$p+2),$store);
158
	}
159
	
160
	list($table,$casier,$sous_casier) = expliquer_config($cfg);
161
	// il faut au moins un casier pour ecrire

ecrire/inc/filtres.php 1 location

@@ 2599-2607 (lines=9) @@
2596
	// extraire la signature en debut de contexte
2597
	// et la verifier avant de deserializer
2598
	// format : signature:donneesserializees
2599
	if ($p = strpos($c,":")){
2600
		$cle = substr($c,0,$p);
2601
		$c = substr($c,$p+1);
2602
2603
		if ($cle == calculer_cle_action($form . $c)) {
2604
			$env = @unserialize($c);
2605
			return $env;
2606
		}
2607
	}
2608
2609
	return false;
2610
}