mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Don't use aggregation functions in unique_idf
Single checkbox can edit multiple rows with aggregation git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@926 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -69,7 +69,9 @@ function unique_idf($row, $indexes) {
|
||||
}
|
||||
$return = array();
|
||||
foreach ($row as $key => $val) {
|
||||
$return[] = (isset($val) ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
|
||||
if (!preg_match('~^(COUNT\\((\\*|(DISTINCT )?`(?:[^`]+|``)+`)\\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\\(`(?:[^`]+|``)+`\\))$~', $key)) { //! columns looking like functions
|
||||
$return[] = (isset($val) ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user