From d92531c7fb6417bb81d8595607cef3e1ef4a2654 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 2 Aug 2013 15:11:00 -0700 Subject: [PATCH] Hide link to SQL command if not supported --- adminer/include/adminer.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 9209dd42..276a15d5 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -170,7 +170,7 @@ username.form['auth[driver]'].onchange(); function selectQuery($query) { global $jush; return "

" . h(str_replace("\n", " ", $query)) . "" - . " " . lang('Edit') . "" + . (support("sql") ? " " . lang('Edit') . "" : "") . "

" //

- required for IE9 inline edit ; } @@ -498,7 +498,11 @@ username.form['auth[driver]'].onchange(); $query = preg_replace('~[\x80-\xFF]+$~', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment } $history[$_GET["db"]][] = array($query, time()); // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"] - return " " . @date("H:i:s") . " " . lang('SQL command') . "'; // @ - time zone may be not set + return " " . @date("H:i:s") . " " . lang('SQL command') . "" // @ - time zone may be not set + . "' + ; } /** Functions displayed in edit form