summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriskl2006-01-09 05:45:02 +0000
committerchriskl2006-01-09 05:45:02 +0000
commit1951a16dae01f639f0f3104e4c9f5ee3965955a2 (patch)
treefdc288df731c9d55aceda93fc84b7ec50921d898
parent021c20c653551d490a0e28c150f6fea430d09a3f (diff)
Backport: Fix PostgreSQL 7.2 and lower (tree assumed schemas)
-rw-r--r--HISTORY1
-rw-r--r--classes/Misc.php17
-rwxr-xr-xdatabase.php5
3 files changed, 8 insertions, 15 deletions
diff --git a/HISTORY b/HISTORY
index 63331f13..f09a2655 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8,6 +8,7 @@ Bugs
* Fix error reporting during SQL script execution
* Fix decorator.inc.php include for open_basedir restricted PHP
* Display text[], byte[] and character[] types as textareas
+* Fix tree display for PostgreSQL 7.2 and lower
Version 4.0.1
-------------
diff --git a/classes/Misc.php b/classes/Misc.php
index 4a6d4d35..9b5d39c4 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -2,7 +2,7 @@
/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.113.2.4 2005/12/06 08:43:17 chriskl Exp $
+ * $Id: Misc.php,v 1.113.2.5 2006/01/09 05:45:02 chriskl Exp $
*/
class Misc {
@@ -393,19 +393,8 @@
global $misc, $conf, $data, $lang;
if (is_string($tabs)) {
- switch ($tabs) {
- case 'database':
- case 'schema':
- if ($data->hasSchemas() === false) {
- $this->printTabs($this->getNavTabs('database'), $activetab);
- $this->printTabs($this->getNavTabs('schema'), $activetab);
- $_SESSION['webdbLastTab']['database'] = $activetab;
- return;
- }
- default:
- $_SESSION['webdbLastTab'][$tabs] = $activetab;
- $tabs = $this->getNavTabs($tabs);
- }
+ $_SESSION['webdbLastTab'][$tabs] = $activetab;
+ $tabs = $this->getNavTabs($tabs);
}
echo "<table class=\"tabs\"><tr>\n";
diff --git a/database.php b/database.php
index c1b45d5c..1bb2090f 100755
--- a/database.php
+++ b/database.php
@@ -3,7 +3,7 @@
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.78 2005/11/09 09:05:58 jollytoad Exp $
+ * $Id: database.php,v 1.78.2.1 2006/01/09 05:45:02 chriskl Exp $
*/
// Include application functions
@@ -541,6 +541,9 @@
$reqvars = $misc->getRequestVars('database');
$tabs = $misc->getNavTabs('database');
+ if (!$data->hasSchemas()) {
+ $tabs = array_merge($misc->getNavTabs('schema'), $tabs);
+ }
$items = $misc->adjustTabsForTree($tabs);