From b74dfdc5127f492391682ff7344d4e767226eb14 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 8 Sep 2009 15:22:27 +0000 Subject: [PATCH] Print first function if only one git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1073 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/include/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index f7004eef..71d274ac 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -445,7 +445,7 @@ function input($field, $value, $function) { $first++; } $onchange = ($first ? " onchange=\"var f = this.form['function[" . addcslashes($name, "\r\n'\\") . "]']; if ($first > f.selectedIndex) f.selectedIndex = $first;\"" : ""); - echo (count($functions) > 1 ? "" : nbsp($functions[0])) . ''; + echo (count($functions) > 1 ? "" : nbsp(reset($functions))) . ''; $input = $adminer->editInput($_GET["edit"], $field, " name='fields[$name]'$onchange", $value); // usage in call is without a table if (strlen($input)) { echo $input;