From: jakubvrana Date: Fri, 31 Jul 2009 09:43:53 +0000 (+0000) Subject: Distinguish no column order in fieldName X-Git-Tag: v3.0.0~572 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=23df820f59d8d124868a7ef0bc55b6cffbc8fb9d;p=adminer.git Distinguish no column order in fieldName git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@955 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 8e1ab2ee..b0e82632 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -183,7 +183,7 @@ if (!$columns) { echo ""; $names = array(); reset($select); - $order = 0; + $order = 1; foreach ($rows[0] as $key => $val) { $val = $_GET["columns"][key($select)]; $field = $fields[$select ? $val["col"] : $key]; diff --git a/editor/example.php b/editor/example.php index 1a8b518e..e15807d8 100644 --- a/editor/example.php +++ b/editor/example.php @@ -29,8 +29,8 @@ function adminer_object() { } function fieldName($field, $order = 0) { - // only first five columns with comments will be displayed - return ($order < 5 ? h($field["comment"]) : ""); + // only columns with comments will be displayed and only the first five in select + return ($order <= 5 ? h($field["comment"]) : ""); } }