diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index a604fcfa..e3bd6f31 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -306,7 +306,7 @@ if (isset($_GET["mssql"])) { return true; } - function fields($table, $hidden = false) { + function fields($table) { $return = array(); foreach (get_rows("SELECT c.*, t.name type, d.definition [default] FROM sys.all_columns c diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 565e57ab..24967642 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -393,10 +393,9 @@ if (!defined("DRIVER")) { /** Get information about fields * @param string - * @param bool display hidden table columns * @return array array($name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => )) */ - function fields($table, $hidden = false) { + function fields($table) { $return = array(); foreach (get_rows("SHOW FULL COLUMNS FROM " . table($table)) as $row) { preg_match('~^([^( ]+)(?:\\((.+)\\))?( unsigned)?( zerofill)?$~', $row["Type"], $match); diff --git a/adminer/drivers/oracle.inc.php b/adminer/drivers/oracle.inc.php index 5d2488b0..1b001f0a 100644 --- a/adminer/drivers/oracle.inc.php +++ b/adminer/drivers/oracle.inc.php @@ -203,7 +203,7 @@ UNION SELECT view_name, 'view' FROM user_views" . ($name != "" ? " WHERE view_na return true; } - function fields($table, $hidden = false) { + function fields($table) { $return = array(); foreach (get_rows("SELECT * FROM all_tab_columns WHERE table_name = " . q($table) . " ORDER BY column_id") as $row) { $type = $row["DATA_TYPE"]; diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 4fb10c6f..6f3211b4 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -215,7 +215,7 @@ AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema( return true; } - function fields($table, $hidden = false) { + function fields($table) { $return = array(); foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull, col_description(c.oid, a.attnum) AS comment FROM pg_class c @@ -225,8 +225,8 @@ LEFT JOIN pg_attrdef d ON c.oid = d.adrelid AND a.attnum = d.adnum WHERE c.relname = " . q($table) . " AND n.nspname = current_schema() AND NOT a.attisdropped -" . ($hidden ? "" : "AND a.attnum > 0") . " -ORDER BY a.attnum < 0, a.attnum" +AND a.attnum > 0 +ORDER BY a.attnum" ) as $row) { //! collation, primary ereg('(.*)(\\((.*)\\))?', $row["full_type"], $match); diff --git a/adminer/drivers/sqlite.inc.php b/adminer/drivers/sqlite.inc.php index 03221e91..87498ae1 100644 --- a/adminer/drivers/sqlite.inc.php +++ b/adminer/drivers/sqlite.inc.php @@ -263,7 +263,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { return !$connection->result("SELECT sqlite_compileoption_used('OMIT_FOREIGN_KEY')"); } - function fields($table, $hidden = false) { + function fields($table) { $return = array(); foreach (get_rows("PRAGMA table_info(" . table($table) . ")") as $row) { $type = strtolower($row["type"]); diff --git a/adminer/select.inc.php b/adminer/select.inc.php index c2c6229d..be717b72 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -2,7 +2,7 @@ $TABLE = $_GET["select"]; $table_status = table_status($TABLE); $indexes = indexes($TABLE); -$fields = fields($TABLE, 1); // 1 - hidden +$fields = fields($TABLE); $foreign_keys = column_foreign_keys($TABLE); $rights = array(); // privilege => 0