]> git.joonet.de Git - adminer.git/commitdiff
Convert fields in inline edit
authorJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 23:25:25 +0000 (16:25 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 23:25:25 +0000 (16:25 -0700)
adminer/select.inc.php

index e8b28c102569770e986552d36b00859285dabdee..28ed2d01f490bde996ee391d1a0a3fbb73a347cb 100644 (file)
@@ -45,7 +45,8 @@ $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") .
 if ($_GET["val"] && is_ajax()) {
        header("Content-Type: text/plain; charset=utf-8");
        foreach ($_GET["val"] as $unique_idf => $row) {
-               echo $connection->result("SELECT" . limit(idf_escape(key($row)) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
+               $as = convert_field($fields[key($row)]);
+               echo $connection->result("SELECT" . limit(($as ? $as : idf_escape(key($row))) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
        }
        exit;
 }