Code Duplication    Length = 1-2 lines in 2 locations

ecrire/req/sqlite_generique.php 2 locations

@@ 857-857 (lines=1) @@
854
function spip_sqlite_quote($v, $type=''){
855
	if (is_array($v)) return join(",", array_map('spip_sqlite_quote', $v));
856
	if (is_int($v)) return strval($v);
857
	if (strncmp($v,'0x',2)==0 AND ctype_xdigit(substr($v,2))) return hexdec(substr($v,2));
858
	if ($type === 'int' AND !$v) return '0';
859
860
	if (function_exists('sqlite_escape_string')) {
@@ 1175-1176 (lines=2) @@
1172
	if (sql_test_int($type)) {
1173
		if (is_numeric($v))
1174
			return $v;
1175
		if (ctype_xdigit(substr($v,2)) AND strncmp($v,'0x',2)==0)
1176
			return hexdec(substr($v,2));
1177
	}
1178
	//else return  ("'" . spip_sqlite_quote($v) . "'");
1179
	return  (spip_sqlite_quote($v));