Code Duplication    Length = 1-1 lines in 2 locations

include/adminer.php 1 location

@@ 59-59 (lines=1) @@
56
2;$K[$z]=$L[$z];}return$K;}}}function
57
escape_key($z){if(preg_match('(^([\w(]+)('.str_replace("_",".*",preg_quote(idf_escape("_"))).')([ \w)]+)$)',$z,$C))return$C[1].idf_escape(idf_unescape($C[2])).$C[3];return
58
idf_escape($z);}function
59
where($Z,$m=array()){global$e,$y;$K=array();foreach((array)$Z["where"]as$z=>$X){$z=bracket_escape($z,1);$c=escape_key($z);$K[]=$c.(($y=="sql"&&preg_match('~^[0-9]*\\.[0-9]*$~',$X))||$y=="mssql"?" LIKE ".q(addcslashes($X,"%_\\")):" = ".unconvert_field($m[$z],q($X)));if($y=="sql"&&preg_match('~char|text~',$m[$z]["type"])&&preg_match("~[^ -@]~",$X))$K[]="$c = ".q($X)." COLLATE ".charset($e)."_bin";}foreach((array)$Z["null"]as$z)$K[]=escape_key($z)." IS NULL";return
60
implode(" AND ",$K);}function
61
where_check($X,$m=array()){parse_str($X,$Ma);remove_slashes(array(&$Ma));return
62
where($Ma,$m);}function

include/editor.php 1 location

@@ 59-59 (lines=1) @@
56
2;$K[$x]=$L[$x];}return$K;}}}function
57
escape_key($x){if(preg_match('(^([\w(]+)('.str_replace("_",".*",preg_quote(idf_escape("_"))).')([ \w)]+)$)',$x,$A))return$A[1].idf_escape(idf_unescape($A[2])).$A[3];return
58
idf_escape($x);}function
59
where($Y,$m=array()){global$f,$v;$K=array();foreach((array)$Y["where"]as$x=>$V){$x=bracket_escape($x,1);$d=escape_key($x);$K[]=$d.(($v=="sql"&&preg_match('~^[0-9]*\\.[0-9]*$~',$V))||$v=="mssql"?" LIKE ".q(addcslashes($V,"%_\\")):" = ".unconvert_field($m[$x],q($V)));if($v=="sql"&&preg_match('~char|text~',$m[$x]["type"])&&preg_match("~[^ -@]~",$V))$K[]="$d = ".q($V)." COLLATE ".charset($f)."_bin";}foreach((array)$Y["null"]as$x)$K[]=escape_key($x)." IS NULL";return
60
implode(" AND ",$K);}function
61
where_check($V,$m=array()){parse_str($V,$Ea);remove_slashes(array(&$Ea));return
62
where($Ea,$m);}function