diff --git a/plugins/database-hide.php b/plugins/database-hide.php index 4c3883ad..3786be7d 100644 --- a/plugins/database-hide.php +++ b/plugins/database-hide.php @@ -18,7 +18,7 @@ class AdminerDatabaseHide { function databases($flush = true) { $return = array(); - foreach (get_databases($flush) as $db) { + foreach (Adminer\get_databases($flush) as $db) { if (!in_array(strtolower($db), $this->disabled)) { $return[] = $db; } diff --git a/plugins/dump-alter.php b/plugins/dump-alter.php index 5c9f6b73..8c828521 100644 --- a/plugins/dump-alter.php +++ b/plugins/dump-alter.php @@ -69,7 +69,7 @@ SELECT @adminer_alter; function dumpTable($table, $style, $is_view = 0) { if ($_POST["format"] == "sql_alter") { - $create = create_sql($table, $_POST["auto_increment"], $style); + $create = Adminer\create_sql($table, $_POST["auto_increment"], $style); if ($is_view) { echo substr_replace($create, " OR REPLACE", 6, 0) . ";\n\n"; } else { @@ -140,7 +140,7 @@ CREATE PROCEDURE adminer_alter (INOUT alter_command text) BEGIN UNTIL done END REPEAT; CLOSE columns; IF @alter_table != '' OR add_columns != '' THEN - SET alter_command = CONCAT(alter_command, 'ALTER TABLE " . table($table) . "', SUBSTR(CONCAT(add_columns, @alter_table), 2), ';\\n'); + SET alter_command = CONCAT(alter_command, 'ALTER TABLE " . Adminer\table($table) . "', SUBSTR(CONCAT(add_columns, @alter_table), 2), ';\\n'); END IF; END;; DELIMITER ; diff --git a/plugins/edit-foreign.php b/plugins/edit-foreign.php index 57f9ad6d..2e4236f6 100644 --- a/plugins/edit-foreign.php +++ b/plugins/edit-foreign.php @@ -30,7 +30,7 @@ class AdminerEditForeign { if (preg_match('~binary~', $field["type"])) { $column = "HEX($column)"; } - $options = array("" => "") + Adminer\get_vals("SELECT $column FROM " . table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : "")); + $options = array("" => "") + Adminer\get_vals("SELECT $column FROM " . Adminer\table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : "")); if ($this->_limit && count($options) - 1 > $this->_limit) { return; } diff --git a/plugins/enum-types.php b/plugins/enum-types.php index dd36d6d1..6a612615 100644 --- a/plugins/enum-types.php +++ b/plugins/enum-types.php @@ -17,7 +17,7 @@ class AdminerEnumTypes { // read types and "cache" it if (is_null($this->_types)) { - $types = types(); + $types = Adminer\types(); $this->_types = array(); foreach ($types as $type) { diff --git a/plugins/slugify.php b/plugins/slugify.php index e9071ebc..6331db35 100644 --- a/plugins/slugify.php +++ b/plugins/slugify.php @@ -25,7 +25,7 @@ class AdminerSlugify { if ($slugify === null) { $slugify = array(); $prev = null; - foreach (fields($table) as $name => $val) { + foreach (Adminer\fields($table) as $name => $val) { if ($prev && preg_match('~(^|_)slug(_|$)~', $name)) { $slugify[$prev] = $name; } diff --git a/plugins/table-structure.php b/plugins/table-structure.php index e75c3eb0..fd0428ec 100644 --- a/plugins/table-structure.php +++ b/plugins/table-structure.php @@ -15,7 +15,7 @@ class AdminerTableStructure { function tableStructurePrint($fields) { echo "
\n"; echo "\n"; - echo "\n"; + echo "\n"; foreach ($fields as $field) { echo "
" . Adminer\lang('Column') . "" . Adminer\lang('Type') . "" . Adminer\lang('Collation') . "" . Adminer\lang('Nullable') . "" . Adminer\lang('Default') . (support("comment") ? "" . Adminer\lang('Comment') : "") . "
" . Adminer\lang('Column') . "" . Adminer\lang('Type') . "" . Adminer\lang('Collation') . "" . Adminer\lang('Nullable') . "" . Adminer\lang('Default') . (Adminer\support("comment") ? "" . Adminer\lang('Comment') : "") . "
" . Adminer\h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : ""); echo "" . Adminer\h($field["full_type"]) . ""; @@ -23,7 +23,7 @@ class AdminerTableStructure { echo "" . ($field["collation"] ? " " . Adminer\h($field["collation"]) . "" : ""); echo "" . ($field["null"] ? Adminer\lang('Yes') : Adminer\lang('No')); echo "" . Adminer\h($field["default"]); - echo (support("comment") ? "" . Adminer\h($field["comment"]) : ""); + echo (Adminer\support("comment") ? "" . Adminer\h($field["comment"]) : ""); echo "\n"; } echo "
\n";