mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
Strip trailing spaces
This commit is contained in:
@@ -28,7 +28,7 @@ include "../adminer/include/functions.inc.php";
|
|||||||
global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
|
global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
|
||||||
|
|
||||||
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
||||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
||||||
}
|
}
|
||||||
if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
|
if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
|
||||||
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
|
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
* @param Min_Result
|
* @param Min_Result
|
||||||
* @param Min_DB connection to examine indexes
|
* @param Min_DB connection to examine indexes
|
||||||
* @param string base link for <th> fields
|
* @param string base link for <th> fields
|
||||||
* @param array
|
* @param array
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function select($result, $connection2 = null, $href = "", $orgtables = array()) {
|
function select($result, $connection2 = null, $href = "", $orgtables = array()) {
|
||||||
@@ -360,11 +360,12 @@ function drop_create($drop, $create, $test, $drop_test, $location, $message_drop
|
|||||||
function create_trigger($on, $row) {
|
function create_trigger($on, $row) {
|
||||||
global $jush;
|
global $jush;
|
||||||
$timing_event = " $row[Timing] $row[Event]";
|
$timing_event = " $row[Timing] $row[Event]";
|
||||||
return "CREATE TRIGGER "
|
return "CREATE TRIGGER "
|
||||||
. idf_escape($row["Trigger"])
|
. idf_escape($row["Trigger"])
|
||||||
. ($jush == "mssql" ? $on . $timing_event : $timing_event . $on)
|
. ($jush == "mssql" ? $on . $timing_event : $timing_event . $on)
|
||||||
. rtrim(" $row[Type]\n$row[Statement]", ";")
|
. rtrim(" $row[Type]\n$row[Statement]", ";")
|
||||||
. ";";
|
. ";"
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Generate SQL query for creating routine
|
/** Generate SQL query for creating routine
|
||||||
@@ -382,13 +383,14 @@ function create_routine($routine, $row) {
|
|||||||
$set[] = (ereg("^($inout)\$", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
$set[] = (ereg("^($inout)\$", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "CREATE $routine "
|
return "CREATE $routine "
|
||||||
. idf_escape(trim($row["name"]))
|
. idf_escape(trim($row["name"]))
|
||||||
. " (" . implode(", ", $set) . ")"
|
. " (" . implode(", ", $set) . ")"
|
||||||
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||||
. ($row["language"] ? " LANGUAGE $row[language]" : "")
|
. ($row["language"] ? " LANGUAGE $row[language]" : "")
|
||||||
. rtrim("\n$row[definition]", ";")
|
. rtrim("\n$row[definition]", ";")
|
||||||
. ";";
|
. ";"
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Remove current user definer from SQL command
|
/** Remove current user definer from SQL command
|
||||||
|
@@ -22,7 +22,7 @@ foreach (process_list() as $i => $row) {
|
|||||||
if (!$i) {
|
if (!$i) {
|
||||||
echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : "");
|
echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : "");
|
||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
echo "<th>" . ($jush == "sql"
|
echo "<th>" . ($jush == "sql"
|
||||||
? "<a href='http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/show-processlist.html#processlist_" . strtolower($key) . "' target='_blank' rel='noreferrer' class='help'>$key</a>"
|
? "<a href='http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/show-processlist.html#processlist_" . strtolower($key) . "' target='_blank' rel='noreferrer' class='help'>$key</a>"
|
||||||
: $key
|
: $key
|
||||||
);
|
);
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
class AdminerMasterSlave {
|
class AdminerMasterSlave {
|
||||||
private $masters = array();
|
private $masters = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array ($slave => $master)
|
* @param array ($slave => $master)
|
||||||
*/
|
*/
|
||||||
function AdminerMasterSlave($masters) {
|
function AdminerMasterSlave($masters) {
|
||||||
|
Reference in New Issue
Block a user