From e3c1f24ad6137e7b20cdec3870f1ac2da095d2bf Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Sun, 21 May 2023 15:03:36 +0200 Subject: [PATCH] Code cosmetics : removed trailing tabs --- adminer/call.inc.php | 8 ++++---- adminer/drivers/elastic.inc.php | 2 +- adminer/drivers/mongo.inc.php | 12 ++++++------ adminer/event.inc.php | 2 +- adminer/foreign.inc.php | 4 ++-- adminer/include/adminer.inc.php | 6 +++--- adminer/include/auth.inc.php | 6 +++--- adminer/include/connect.inc.php | 10 +++++----- adminer/include/driver.inc.php | 28 ++++++++++++++-------------- adminer/include/pdo.inc.php | 26 +++++++++++++------------- adminer/include/tmpfile.inc.php | 8 ++++---- adminer/plugin.php | 10 +++++----- adminer/schema.inc.php | 8 ++++---- adminer/select.inc.php | 2 +- adminer/sql.inc.php | 2 +- adminer/static/default.css | 2 +- adminer/table.inc.php | 2 +- compile.php | 11 ++++------- editor/db.inc.php | 4 ++-- editor/include/adminer.inc.php | 2 +- editor/sqlite.php | 4 ++-- 21 files changed, 78 insertions(+), 81 deletions(-) diff --git a/adminer/call.inc.php b/adminer/call.inc.php index f8988675..e1a2190f 100644 --- a/adminer/call.inc.php +++ b/adminer/call.inc.php @@ -28,13 +28,13 @@ if (!$error && $_POST) { } $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val); } - + $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")"; $start = microtime(true); $result = $connection->multi_query($query); $affected = $connection->affected_rows; // getting warnigns overwrites this echo $adminer->selectQuery($query, $start, !$result); - + if (!$result) { echo "

" . error() . "\n"; } else { @@ -42,7 +42,7 @@ if (!$error && $_POST) { if (is_object($connection2)) { $connection2->select_db(DB); } - + do { $result = $connection->store_result(); if (is_object($result)) { @@ -53,7 +53,7 @@ if (!$error && $_POST) { ; } } while ($connection->next_result()); - + if ($out) { select($connection->query("SELECT " . implode(", ", $out))); } diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 799f6d0b..7e4a3f99 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -262,7 +262,7 @@ if (isset($_GET["elastic"])) { function db_collation($db, $collations) { } - + function engines() { return array(); } diff --git a/adminer/drivers/mongo.inc.php b/adminer/drivers/mongo.inc.php index 63649f04..2b89c46a 100644 --- a/adminer/drivers/mongo.inc.php +++ b/adminer/drivers/mongo.inc.php @@ -24,7 +24,7 @@ if (isset($_GET["mongo"])) { $this->error = $e->getMessage(); } } - + function query($query) { return false; } @@ -109,7 +109,7 @@ if (isset($_GET["mongo"])) { class Min_Driver extends Min_SQL { public $primary = "_id"; - + function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { $select = ($select == array("*") ? array() @@ -127,7 +127,7 @@ if (isset($_GET["mongo"])) { ->skip($page * $limit) ); } - + function insert($table, $set) { try { $return = $this->_conn->_db->selectCollection($table)->insert($set); @@ -219,7 +219,7 @@ if (isset($_GET["mongo"])) { $this->_link = new $class($uri, $options); $this->executeCommand('admin', array('ping' => 1)); } - + function executeCommand($db, $command) { $class = 'MongoDB\Driver\Command'; try { @@ -229,7 +229,7 @@ if (isset($_GET["mongo"])) { return array(); } } - + function executeBulkWrite($namespace, $bulk, $counter) { try { $results = $this->_link->executeBulkWrite($namespace, $bulk); @@ -575,7 +575,7 @@ if (isset($_GET["mongo"])) { "(date)>=", "(date)<=", ); - + } function table($idf) { diff --git a/adminer/event.inc.php b/adminer/event.inc.php index 9404211b..6f62a7e8 100644 --- a/adminer/event.inc.php +++ b/adminer/event.inc.php @@ -15,7 +15,7 @@ if ($_POST && !$error) { : "AT " . q($row["STARTS"]) ) . " ON COMPLETION" . ($row["ON_COMPLETION"] ? "" : " NOT") . " PRESERVE" ; - + queries_redirect(substr(ME, 0, -1), ($EVENT != "" ? lang('Event has been altered.') : lang('Event has been created.')), queries(($EVENT != "" ? "ALTER EVENT " . idf_escape($EVENT) . $schedule . ($EVENT != $row["EVENT_NAME"] ? "\nRENAME TO " . idf_escape($row["EVENT_NAME"]) : "") diff --git a/adminer/foreign.inc.php b/adminer/foreign.inc.php index 726d6c79..75a909e9 100644 --- a/adminer/foreign.inc.php +++ b/adminer/foreign.inc.php @@ -6,7 +6,7 @@ $row = $_POST; if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-js"]) { $message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.'))); $location = ME . "table=" . urlencode($TABLE); - + if (!$_POST["drop"]) { $row["source"] = array_filter($row["source"], 'strlen'); ksort($row["source"]); // enforce input order @@ -16,7 +16,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change- } $row["target"] = $target; } - + if ($jush == "sqlite") { queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row))))); } else { diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 632e2928..401e4f27 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -39,7 +39,7 @@ class Adminer { function bruteForceKey() { return $_SERVER["REMOTE_ADDR"]; } - + /** Get server name displayed in breadcrumbs * @param string * @return string HTML code or null @@ -128,7 +128,7 @@ class Adminer { echo "

\n"; echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n"; } - + /** Get login form field * @param string * @param string HTML @@ -480,7 +480,7 @@ class Adminer { echo "\n"; echo "\n"; } - + /** Print command box in select * @return bool whether to print default commands */ diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index ed104154..cbf9518c 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -72,14 +72,14 @@ if ($auth) { ) { redirect(auth_url($vendor, $server, $username, $db)); } - + } elseif ($_POST["logout"] && (!$has_token || verify_token())) { foreach (array("pwds", "db", "dbs", "queries") as $key) { set_session($key, null); } unset_permanent(); redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.') . ' ' . lang('Thanks for using Adminer, consider donating.')); - + } elseif ($permanent && !$_SESSION["pwds"]) { session_regenerate_id(); $private = $adminer->permanentLogin(); @@ -199,7 +199,7 @@ if ($_POST) { : lang('Invalid CSRF token. Send the form again.') . ' ' . lang('If you did not send this request from Adminer then close this page.') ); } - + } elseif ($_SERVER["REQUEST_METHOD"] == "POST") { // posted form with no data means that post_max_size exceeded because Adminer always sends token at least $error = lang('Too big POST data. Reduce the data or increase the %s configuration directive.', "'post_max_size'"); diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index 38f477c8..322444cd 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -8,7 +8,7 @@ function connect_error() { if ($_POST["db"] && !$error) { queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"])); } - + page_header(lang('Select database'), $error, false); echo "