Version 3.6-dev
---------------
+Features
+* Allow current database to be at the top
+
Bugs
* Tree Icons are displayed middle instead of top
* Ensure login frame is always at top level (Russell Smith)
* if you click on a database it shows a list of database objects in that
* database.
*
- * $Id: browser.php,v 1.42 2004/09/02 13:53:56 jollytoad Exp $
+ * $Id: browser.php,v 1.43 2005/02/06 00:34:19 mr-russ Exp $
*/
// Include application functions
}
}
- $databases = &$data->getDatabases();
+ $databases = &$data->getDatabases($conf['current_db_at_top'] && isset($_REQUEST['database']) ?
+ $_REQUEST['database'] : NULL);
while (!$databases->EOF) {
// If database is selected, show folder, otherwise show document
if (isset($_REQUEST['database']) && $_REQUEST['database'] == $databases->f['datname']) {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.251 2004/11/16 12:40:29 soranzo Exp $
+ * $Id: Postgres.php,v 1.252 2005/02/06 00:34:20 mr-russ Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
* Return all database available on the server
* @return A list of databases, sorted alphabetically
*/
- function &getDatabases() {
+ function &getDatabases($currentdatabase = NULL) {
global $conf;
if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($_SESSION['webdbUsername'])) {
}
else $clause = '';
+ if ($currentdatabase != NULL)
+ $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname";
+ else
+ $orderby = "ORDER BY pdb.datname";
+
if (!$conf['show_system'])
$where = "AND pdb.datname NOT IN ('template1')";
else
WHERE pdb.datdba = pu.usesysid
{$where}
{$clause}
- ORDER BY pdb.datname";
+ {$orderby}";
return $this->selectSet($sql);
}
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.68 2004/11/10 01:46:35 chriskl Exp $
+ * $Id: Postgres71.php,v 1.69 2005/02/06 00:34:20 mr-russ Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
$clause = " AND pu.usename='{$username}'";
}
else $clause = '';
-
+
+ if ($currentdatabase != NULL)
+ $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname";
+ else
+ $orderby = "ORDER BY pdb.datname";
+
if (!$conf['show_system'])
$where = ' AND NOT pdb.datistemplate';
else
WHERE pdb.datdba = pu.usesysid
{$where}
{$clause}
- ORDER BY pdb.datname";
+ {$orderby}";
+
return $this->selectSet($sql);
}
/**
* PostgreSQL 8.0 support
*
- * $Id: Postgres80.php,v 1.9 2005/02/01 16:41:19 chriskl Exp $
+ * $Id: Postgres80.php,v 1.10 2005/02/06 00:34:20 mr-russ Exp $
*/
include_once('./classes/database/Postgres74.php');
* Return all database available on the server
* @return A list of databases, sorted alphabetically
*/
- function &getDatabases() {
+ function &getDatabases($currentdatabase = NULL) {
global $conf;
if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($_SESSION['webdbUsername'])) {
$clause = " AND pu.usename='{$username}'";
}
else $clause = '';
-
+
+ if ($currentdatabase != NULL)
+ $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname";
+ else
+ $orderby = "ORDER BY pdb.datname";
+
if (!$conf['show_system'])
$where = ' AND NOT pdb.datistemplate';
else
WHERE pdb.datdba = pu.usesysid
{$where}
{$clause}
- ORDER BY pdb.datname";
-
+ {$orderby}";
+
return $this->selectSet($sql);
}
-
+
// Schema functions
/**
* Central phpPgAdmin configuration. As a user you may modify the
* settings here for your particular configuration.
*
- * $Id: config.inc.php-dist,v 1.36 2004/11/15 16:03:46 soranzo Exp $
+ * $Id: config.inc.php-dist,v 1.37 2005/02/06 00:34:20 mr-russ Exp $
*/
// An example server. Create as many of these as you wish,
// Send XHTML headers? Unless debugging, it's best to leave this off
$conf['use_xhtml'] = false;
+ // Show current database at top of list?
+ $conf['current_db_at_top'] = false;
+
/*****************************************
* Don't modify anything below this line *
*****************************************/