From 923c0ffc879e054edbde2edb063b015f1a8a7fa0 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 22 Jan 2018 13:51:47 +0100 Subject: [PATCH] Fix whitespace --- adminer/drivers/elastic.inc.php | 4 ++-- adminer/drivers/mssql.inc.php | 2 +- adminer/drivers/pgsql.inc.php | 4 ++-- adminer/include/adminer.inc.php | 2 +- adminer/include/editing.inc.php | 2 +- adminer/include/functions.inc.php | 6 +++--- adminer/include/lang.inc.php | 2 +- adminer/lang/de.inc.php | 2 +- adminer/lang/el.inc.php | 2 +- adminer/lang/he.inc.php | 2 +- adminer/lang/sr.inc.php | 4 ++-- editor/include/adminer.inc.php | 2 +- plugins/login-servers.php | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index c5f42586..00a6e525 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -17,7 +17,7 @@ if (isset($_GET["elastic"])) { */ function rootQuery($path, $content = array(), $method = 'GET') { @ini_set('track_errors', 1); // @ - may be disabled - $file = @file_get_contents($this->_url . '/' . ltrim($path, '/'), false, stream_context_create(array('http' => array( + $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array( 'method' => $method, 'content' => $content === null ? $content : json_encode($content), 'header' => 'Content-Type: application/json', @@ -157,7 +157,7 @@ if (isset($_GET["elastic"])) { foreach ($search['hits']['hits'] as $hit) { $row = array(); if ($select == array("*")) { - $row["_id"] = $hit["_id"]; + $row["_id"] = $hit["_id"]; } $fields = $hit['_source']; if ($select != array("*")) { diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index d99e5092..c493f78c 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -314,7 +314,7 @@ if (isset($_GET["mssql"])) { function db_collation($db, $collations) { global $connection; - return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db)); + return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db)); } function engines() { diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index aed3da58..e7039c31 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -713,8 +713,8 @@ AND typelem = 0" function trigger_sql($table, $style) { $return = ""; //foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) { - // $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "") - // . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n"; + // $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "") + // . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n"; //} //return $return; diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 5acd4433..fa24f9cf 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -317,7 +317,7 @@ class Adminer { " name='columns[$i][col]'", $columns, $val["col"], - ($key !== "" ? "selectFieldChange" : "selectAddRow") + ($key !== "" ? "selectFieldChange" : "selectAddRow") ); echo "
" . ($functions || $grouping ? "" diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index d2997494..ec77389b 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -531,7 +531,7 @@ function db_size($db) { * @return null */ function set_utf8mb4($create) { - global $connection; + global $connection; static $set = false; if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive $set = true; diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index d5d46611..2bf679b6 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -38,7 +38,7 @@ function escape_string($val) { * @return string */ function number($val) { - return preg_replace('~[^0-9]+~', '', $val); + return preg_replace('~[^0-9]+~', '', $val); } /** Disable magic_quotes_gpc @@ -791,7 +791,7 @@ function shorten_utf8($string, $length = 80, $suffix = "") { * @return string */ function format_number($val) { - return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY)); + return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY)); } /** Generate friendly URL @@ -915,7 +915,7 @@ function input($field, $value, $function) { echo $input; } elseif (preg_match('~bool~', $field["type"])) { echo "" . - ""; + ""; } elseif ($field["type"] == "set") { //! 64 bits preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches); foreach ($matches[1] as $i => $val) { diff --git a/adminer/include/lang.inc.php b/adminer/include/lang.inc.php index dec70ff1..332b10f2 100644 --- a/adminer/include/lang.inc.php +++ b/adminer/include/lang.inc.php @@ -36,7 +36,7 @@ $langs = array( 'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com 'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com 'ta' => 'த‌மிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com - 'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/ + 'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/ 'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com 'uk' => 'Українська', // Valerii Kryzhov 'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php index b24c0935..f8382484 100644 --- a/adminer/lang/de.inc.php +++ b/adminer/lang/de.inc.php @@ -283,6 +283,6 @@ $translations = array( 'Saving' => 'Speichere', 'yes' => 'ja', 'no' => 'nein', - 'Master password expired. Implement %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. Implementieren Sie die %s Methode, um es permanent zu machen.', + 'Master password expired. Implement %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. Implementieren Sie die %s Methode, um es permanent zu machen.', '%d / ' => '%d / ', ); diff --git a/adminer/lang/el.inc.php b/adminer/lang/el.inc.php index f7dc5492..181a03c9 100644 --- a/adminer/lang/el.inc.php +++ b/adminer/lang/el.inc.php @@ -149,7 +149,7 @@ $translations = array( 'Table' => 'Πίνακας', 'No tables.' => 'Χωρίς πίνακες.', 'Alter table' => 'Τροποποίηση πίνακα', - 'Create table' => 'Δημιουργία πίνακα', + 'Create table' => 'Δημιουργία πίνακα', 'Table has been dropped.' => 'Ο πίνακας διαγράφηκε.', 'Tables have been dropped.' => 'Οι πινακες διαγράφηκαν.', 'Tables have been optimized.' => 'Οι πίνακες βελτιστοποιήθηκαν.', diff --git a/adminer/lang/he.inc.php b/adminer/lang/he.inc.php index 60773b09..8356a12a 100644 --- a/adminer/lang/he.inc.php +++ b/adminer/lang/he.inc.php @@ -281,7 +281,7 @@ $translations = array( 'Full table scan' => 'סריקה טבלה מלאה', 'Too many unsuccessful logins, try again in %d minute(s).' => 'יותר מידי נסיונות כניסה נכשלו, אנא נסה עוד %d דקות', 'Thanks for using Adminer, consider donating.' => 'תודה שהשתמש ב-adminer אנא שקול לתרום.', - 'Master password expired. Implement %s method to make it permanent.' => 'סיסמת המאסטר פגה התקן תוסף על מנת להפוך את זה לתמידי', + 'Master password expired. Implement %s method to make it permanent.' => 'סיסמת המאסטר פגה התקן תוסף על מנת להפוך את זה לתמידי', 'If you did not send this request from Adminer then close this page.' => 'אם לא אתה שלחת בקשה ל-Adminer הינך יכול לסגור חלון זה', 'You can upload a big SQL file via FTP and import it from server.' => 'ניתן לעלות קבצים ב-FTP ואז למשוך אותם מהשרת', 'Size' => 'גודל', diff --git a/adminer/lang/sr.inc.php b/adminer/lang/sr.inc.php index 18f2d82d..1ac27486 100644 --- a/adminer/lang/sr.inc.php +++ b/adminer/lang/sr.inc.php @@ -231,8 +231,8 @@ $translations = array( '%d row(s)' => array('%d ред', '%d реда', '%d редова'), 'Page' => 'Страна', 'last' => 'последња', - 'Loading' => 'Учитавам', - 'Load more data' => 'Учитавам још података', + 'Loading' => 'Учитавам', + 'Load more data' => 'Учитавам још података', 'whole result' => 'цео резултат', '%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'), diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 4fa29af6..9131dba0 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -461,7 +461,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 if ($options !== null) { return (is_array($options) ? "" . optionlist($options, $value, true) . "" - : "" + : "" . "" . "
" . script("qsl('input').oninput = partial(whisper, '" . ME . "script=complete&source=" . urlencode($table) . "&field=" . urlencode($field["field"]) . "&value='); diff --git a/plugins/login-servers.php b/plugins/login-servers.php index 8b675592..053c93db 100644 --- a/plugins/login-servers.php +++ b/plugins/login-servers.php @@ -39,7 +39,7 @@ class AdminerLoginServers { ?>
-
"> +
">