Code Duplication    Length = 5-5 lines in 2 locations

ecrire/req/sqlite_generique.php 2 locations

@@ 2273-2277 (lines=5) @@
2270
2271
		// Correction des dates avec INTERVAL
2272
		// utiliser sql_date_proche() de preference
2273
		if (strpos($this->query, 'INTERVAL')!==false){
2274
			$this->query = preg_replace_callback("/DATE_(ADD|SUB)(.*)INTERVAL\s+(\d+)\s+([a-zA-Z]+)\)/U",
2275
			                                     array(&$this, '_remplacerDateParTime'),
2276
			                                     $this->query);
2277
		}
2278
2279
		if (strpos($this->query, 'LEFT(')!==false){
2280
			$this->query = str_replace('LEFT(','_LEFT(',$this->query);
@@ 2298-2302 (lines=5) @@
2295
2296
		// Correction Field
2297
		// remplace FIELD(table,i,j,k...) par CASE WHEN table=i THEN n ... ELSE 0 END
2298
		if (strpos($this->query, 'FIELD')!==false){
2299
			$this->query = preg_replace_callback('/FIELD\s*\(([^\)]*)\)/',
2300
			                                     array(&$this, '_remplacerFieldParCase'),
2301
			                                     $this->query);
2302
		}
2303
2304
		// Correction des noms de tables FROM
2305
		// mettre les bons noms de table dans from, update, insert, replace...