mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
PHP: Use ?:
This commit is contained in:
@@ -654,8 +654,8 @@ if (!defined('Adminer\DRIVER')) {
|
||||
"table" => idf_unescape($match[4] != "" ? $match[4] : $match[3]),
|
||||
"source" => array_map('Adminer\idf_unescape', $source[0]),
|
||||
"target" => array_map('Adminer\idf_unescape', $target[0]),
|
||||
"on_delete" => ($match[6] ? $match[6] : "RESTRICT"),
|
||||
"on_update" => ($match[7] ? $match[7] : "RESTRICT"),
|
||||
"on_delete" => ($match[6] ?: "RESTRICT"),
|
||||
"on_update" => ($match[7] ?: "RESTRICT"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -258,7 +258,7 @@ ORDER BY 1"
|
||||
|
||||
function get_current_db() {
|
||||
global $connection;
|
||||
$db = $connection->_current_db ? $connection->_current_db : DB;
|
||||
$db = $connection->_current_db ?: DB;
|
||||
unset($connection->_current_db);
|
||||
return $db;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ ORDER BY 1"
|
||||
|
||||
function views_table($columns) {
|
||||
$owner = where_owner('');
|
||||
return "(SELECT $columns FROM all_views WHERE " . ($owner ? $owner : "rownum < 0") . ")";
|
||||
return "(SELECT $columns FROM all_views WHERE " . ($owner ?: "rownum < 0") . ")";
|
||||
}
|
||||
|
||||
function tables_list() {
|
||||
@@ -503,7 +503,7 @@ AND c_src.TABLE_NAME = " . q($table);
|
||||
|
||||
function schemas() {
|
||||
$return = get_vals("SELECT DISTINCT owner FROM dba_segments WHERE owner IN (SELECT username FROM dba_users WHERE default_tablespace NOT IN ('SYSTEM','SYSAUX')) ORDER BY 1");
|
||||
return ($return ? $return : get_vals("SELECT DISTINCT owner FROM all_tables WHERE tablespace_name = " . q(DB) . " ORDER BY 1"));
|
||||
return ($return ?: get_vals("SELECT DISTINCT owner FROM all_tables WHERE tablespace_name = " . q(DB) . " ORDER BY 1"));
|
||||
}
|
||||
|
||||
function get_schema() {
|
||||
|
Reference in New Issue
Block a user