";
diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php
index 48a2fcac..d54097d6 100644
--- a/adminer/include/design.inc.php
+++ b/adminer/include/design.inc.php
@@ -75,7 +75,7 @@ var thousandsSeparator = '';
' . $drivers[DRIVER] . ' » ';
+ echo '
' . $drivers[DRIVER] . ' » ';
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
$server = $adminer->serverName(SERVER);
$server = ($server != "" ? $server : lang('Server'));
diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php
index b1885221..18734af9 100644
--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -851,7 +851,7 @@ function hidden_fields_get() {
*/
function table_status1($table, $fast = false) {
$return = table_status($table, $fast);
- return ($return ? $return : array("Name" => $table));
+ return ($return ?: array("Name" => $table));
}
/** Find out foreign keys for each column
@@ -1317,7 +1317,7 @@ var timeout = setTimeout(function () {
}
ob_flush();
flush();
- $return = @get_key_vals(($slow_query ? $slow_query : $query), $connection2, false); // @ - may be killed
+ $return = @get_key_vals(($slow_query ?: $query), $connection2, false); // @ - may be killed
if ($connection2) {
echo script("clearTimeout(timeout);");
ob_flush();
diff --git a/adminer/include/lang.inc.php b/adminer/include/lang.inc.php
index 0fbb8ca2..df0622d2 100644
--- a/adminer/include/lang.inc.php
+++ b/adminer/include/lang.inc.php
@@ -65,7 +65,7 @@ function get_lang() {
*/
function lang($idf, $number = null) {
global $LANG, $translations;
- $translation = ($translations[$idf] ? $translations[$idf] : $idf);
+ $translation = ($translations[$idf] ?: $idf);
if (is_array($translation)) {
$pos = ($number == 1 ? 0
: ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other
diff --git a/adminer/indexes.inc.php b/adminer/indexes.inc.php
index 8e3b585e..84f02257 100644
--- a/adminer/indexes.inc.php
+++ b/adminer/indexes.inc.php
@@ -37,7 +37,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
$desc = $index["descs"][$key];
$set[] = idf_escape($column) . ($length ? "(" . (+$length) . ")" : "") . ($desc ? " DESC" : "");
$columns[] = $column;
- $lengths[] = ($length ? $length : null);
+ $lengths[] = ($length ?: null);
$descs[] = $desc;
}
}
diff --git a/adminer/procedure.inc.php b/adminer/procedure.inc.php
index ed0d007e..6e64860d 100644
--- a/adminer/procedure.inc.php
+++ b/adminer/procedure.inc.php
@@ -1,7 +1,7 @@
$match) {
$table_pos[$match[1]] = array($match[2], $match[3]);
@@ -28,7 +28,7 @@ foreach (table_status('', true) as $table => $table_status) {
$field["pos"] = $pos;
$schema[$table]["fields"][$name] = $field;
}
- $schema[$table]["pos"] = ($table_pos[$table] ? $table_pos[$table] : array($top, 0));
+ $schema[$table]["pos"] = ($table_pos[$table] ?: array($top, 0));
foreach ($adminer->foreignKeys($table) as $val) {
if (!$val["db"]) {
$left = $base_left;
diff --git a/adminer/select.inc.php b/adminer/select.inc.php
index 5eaff0fa..b74afc4a 100644
--- a/adminer/select.inc.php
+++ b/adminer/select.inc.php
@@ -33,7 +33,7 @@ if ($_GET["val"] && is_ajax()) {
header("Content-Type: text/plain; charset=utf-8");
foreach ($_GET["val"] as $unique_idf => $row) {
$as = convert_field($fields[key($row)]);
- $select = array($as ? $as : idf_escape(key($row)));
+ $select = array($as ?: idf_escape(key($row)));
$where[] = where_check($unique_idf, $fields);
$return = $driver->select($TABLE, $select, $where, $select);
if ($return) {
diff --git a/compile.php b/compile.php
index 0d7dcb63..25286f9f 100755
--- a/compile.php
+++ b/compile.php
@@ -19,7 +19,7 @@ function add_quo_slashes($s) {
function remove_lang($match) {
global $translations;
$idf = strtr($match[2], array("\\'" => "'", "\\\\" => "\\"));
- $s = ($translations[$idf] ? $translations[$idf] : $idf);
+ $s = ($translations[$idf] ?: $idf);
if ($match[3] == ",") { // lang() has parameters
return $match[1] . (is_array($s) ? "lang(array('" . implode("', '", array_map('add_apo_slashes', $s)) . "')," : "sprintf('" . add_apo_slashes($s) . "',");
}
diff --git a/lang.php b/lang.php
index b748711e..15738fef 100755
--- a/lang.php
+++ b/lang.php
@@ -28,7 +28,7 @@ foreach (
}
}
-foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ? $_SESSION["lang"] : "*") . ".inc.php") as $filename) {
+foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.php") as $filename) {
$messages = $messages_all;
$file = file_get_contents($filename);
$file = str_replace("\r", "", $file);
diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php
index fb71a332..ae6854f1 100644
--- a/plugins/drivers/clickhouse.php
+++ b/plugins/drivers/clickhouse.php
@@ -57,7 +57,7 @@ if (isset($_GET["clickhouse"])) {
function connect($server, $username, $password) {
preg_match('~^(https?://)?(.*)~', $server, $match);
- $this->_url = ($match[1] ? $match[1] : "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
+ $this->_url = ($match[1] ?: "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
$return = $this->query('SELECT 1');
return (bool) $return;
}
diff --git a/plugins/drivers/elastic.php b/plugins/drivers/elastic.php
index 579b8bc3..465cedb3 100644
--- a/plugins/drivers/elastic.php
+++ b/plugins/drivers/elastic.php
@@ -78,7 +78,7 @@ if (isset($_GET["elastic"])) {
*/
function connect($server, $username, $password) {
preg_match('~^(https?://)?(.*)~', $server, $match);
- $this->_url = ($match[1] ? $match[1] : "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
+ $this->_url = ($match[1] ?: "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
$return = $this->query('');
if ($return) {
$this->server_info = $return['version']['number'];
@@ -529,7 +529,7 @@ if (isset($_GET["elastic"])) {
$properties = array();
foreach ($fields as $f) {
$field_name = trim($f[1][0]);
- $field_type = trim($f[1][1] ? $f[1][1] : "text");
+ $field_type = trim($f[1][1] ?: "text");
$properties[$field_name] = array(
'type' => $field_type
);
diff --git a/plugins/drivers/elastic5.php b/plugins/drivers/elastic5.php
index 46ce2468..f2301dff 100644
--- a/plugins/drivers/elastic5.php
+++ b/plugins/drivers/elastic5.php
@@ -68,7 +68,7 @@ if (isset($_GET["elastic5"])) {
function connect($server, $username, $password) {
preg_match('~^(https?://)?(.*)~', $server, $match);
- $this->_url = ($match[1] ? $match[1] : "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
+ $this->_url = ($match[1] ?: "http://") . urlencode($username) . ":" . urlencode($password) . "@$match[2]";
$return = $this->query('');
if ($return) {
$this->server_info = $return['version']['number'];
@@ -505,7 +505,7 @@ if (isset($_GET["elastic5"])) {
$properties = array();
foreach ($fields as $f) {
$field_name = trim($f[1][0]);
- $field_type = trim($f[1][1] ? $f[1][1] : "text");
+ $field_type = trim($f[1][1] ?: "text");
$properties[$field_name] = array(
'type' => $field_type
);
diff --git a/plugins/drivers/simpledb.php b/plugins/drivers/simpledb.php
index 6c638826..241d1774 100644
--- a/plugins/drivers/simpledb.php
+++ b/plugins/drivers/simpledb.php
@@ -439,7 +439,7 @@ if (isset($_GET["simpledb"])) {
}
$connection->error = '';
$tag = $action . "Result";
- return ($xml->$tag ? $xml->$tag : true);
+ return ($xml->$tag ?: true);
}
function sdb_request_all($action, $tag, $params = array(), $timeout = 0) {