Code Duplication    Length = 5-5 lines in 2 locations

ecrire/req/sqlite_generique.php 2 locations

@@ 3061-3065 (lines=5) @@
3058
3059
		// Correction des dates avec INTERVAL
3060
		// utiliser sql_date_proche() de preference
3061
		if (strpos($this->query, 'INTERVAL') !== false) {
3062
			$this->query = preg_replace_callback("/DATE_(ADD|SUB)(.*)INTERVAL\s+(\d+)\s+([a-zA-Z]+)\)/U",
3063
				array(&$this, '_remplacerDateParTime'),
3064
				$this->query);
3065
		}
3066
3067
		if (strpos($this->query, 'LEFT(') !== false) {
3068
			$this->query = str_replace('LEFT(', '_LEFT(', $this->query);
@@ 3087-3091 (lines=5) @@
3084
3085
		// Correction Field
3086
		// remplace FIELD(table,i,j,k...) par CASE WHEN table=i THEN n ... ELSE 0 END
3087
		if (strpos($this->query, 'FIELD') !== false) {
3088
			$this->query = preg_replace_callback('/FIELD\s*\(([^\)]*)\)/',
3089
				array(&$this, '_remplacerFieldParCase'),
3090
				$this->query);
3091
		}
3092
3093
		// Correction des noms de tables FROM
3094
		// mettre les bons noms de table dans from, update, insert, replace...