From de0d3aca84a21b717fd6194e37256e61b7dc08e2 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 23 Jan 2013 03:55:47 -0800 Subject: [PATCH] Allow editing rows without unique key and long text --- adminer/select.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 6b35e62b..1c4f5bdf 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -332,6 +332,10 @@ if (!$columns) { $unique_array = unique_array($rows[$n], $indexes); $unique_idf = ""; foreach ($unique_array as $key => $val) { + if (strlen($val) > 10) { + $key = "MD5(" . (strpos($key, '(') ? $key : idf_escape($key)) . ")"; //! columns looking like functions + $val = md5($val); + } $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key)); } echo "" . (!$group && $select ? "" : "" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : " " . lang('edit') . ""));