mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Always return array from table_status()
This commit is contained in:
@@ -1051,7 +1051,7 @@ class Adminer {
|
||||
}
|
||||
|
||||
/** Set up syntax highlight for code and <textarea>
|
||||
* @param array[] result of table_status()
|
||||
* @param array[] result of table_status('', true)
|
||||
*/
|
||||
function syntaxHighlighting($tables) {
|
||||
global $connection;
|
||||
|
@@ -260,7 +260,7 @@ abstract class SqlDriver {
|
||||
}
|
||||
|
||||
/** Check whether table supports indexes
|
||||
* @param array result of table_status()
|
||||
* @param array result of table_status1()
|
||||
* @return bool
|
||||
*/
|
||||
function supportsIndex($table_status) {
|
||||
|
@@ -701,11 +701,11 @@ function friendly_url($val) {
|
||||
/** Get status of a single table and fall back to name on error
|
||||
* @param string
|
||||
* @param bool
|
||||
* @return array[] same as table_status()
|
||||
* @return array one element from table_status()
|
||||
*/
|
||||
function table_status1($table, $fast = false) {
|
||||
$return = table_status($table, $fast);
|
||||
return ($return ?: array("Name" => $table));
|
||||
return ($return ? reset($return) : array("Name" => $table));
|
||||
}
|
||||
|
||||
/** Find out foreign keys for each column
|
||||
|
Reference in New Issue
Block a user