From: Jakub Vrana
Date: Fri, 2 Aug 2013 22:11:00 +0000 (-0700)
Subject: Hide link to SQL command if not supported
X-Git-Tag: v4.0.0~87
X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=d92531c7fb6417bb81d8595607cef3e1ef4a2654;p=adminer.git
Hide link to SQL command if not supported
---
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