1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

Order by first index in Editor by default

Flush before SHOW DATABASES by default

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@923 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-28 11:04:49 +00:00
parent e1abcda063
commit a3d2266a9c
4 changed files with 17 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ class Adminer {
}
function database() {
$dbs = get_databases();
$dbs = get_databases(false);
return (count($dbs) == 1 ? $dbs[0] : (count($dbs) == 2 && information_schema($dbs[0]) ? $dbs[1] : 'test'));
}
@@ -211,10 +211,15 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
}
function selectOrderProcess($columns, $select, $indexes) {
return ($_GET["order"]
? array(idf_escape($_GET["order"][0]) . (isset($_GET["desc"][0]) ? " DESC" : ""))
: $indexes[$_GET["index_order"]]["columns"]
);
if ($_GET["order"]) {
return array(idf_escape($_GET["order"][0]) . (isset($_GET["desc"][0]) ? " DESC" : ""));
}
if ($_GET["index_order"]) {
return $indexes[$_GET["index_order"]]["columns"];
}
unset($indexes["PRIMARY"]);
$index = reset($indexes);
return ($index ? $index["columns"] : array());
}
function selectLimitProcess() {