add new show_advanced config variable. we need to decide if it's true or false by...
authorchriskl <chriskl>
Sat, 8 Nov 2003 09:06:42 +0000 (09:06 +0000)
committerchriskl <chriskl>
Sat, 8 Nov 2003 09:06:42 +0000 (09:06 +0000)
HISTORY
browser.php
conf/config.inc.php-dist
libraries/lib.inc.php

diff --git a/HISTORY b/HISTORY
index 4a247fa2aeec0b20ba086ca223af16f588891074..63d603756e46bd034dda8b115362cb78edb58146 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -17,11 +17,16 @@ Features
 * Table info - shows table that reference the table, parent tables,
   and child tables.
 * Choice of operator when performing a Select
+* 'Select All' feature of table selects now available on view
+  selects.
 * Removed any trace of MySQL support
 * Show casts
 * Show conversions
 * Show languages
 * Make table icon link to browse table
+* New show_advanced option that allows the hiding or display of
+  "advanced" objects such as conversions, types, operators, casts and
+  languages.
 
 Bugs
 * Added legal DOCTYPE
index 6fa65e4ebab89865670c5165ba5f15612ef88ae0..150d2dbd79af61bf4bd3c2861f5fa7a8779c8f82 100644 (file)
@@ -5,7 +5,7 @@
         * if you click on a database it shows a list of database objects in that
         * database.
         *
-        * $Id: browser.php,v 1.24 2003/11/05 08:32:03 chriskl Exp $
+        * $Id: browser.php,v 1.25 2003/11/08 09:06:42 chriskl Exp $
         */
 
        // Include application functions
                        $schemanode->addItem($dom_node);
                }
                // Advanced
-               if ($data->hasTypes() || $data->hasOperators() || $data->hasConversions()) {
-                       $adv_node = &new HTML_TreeNode(array(
-                                                       'text' => $lang['stradvanced'], 
-                                                       'link' => addslashes(htmlspecialchars("schema.php?{$querystr}&" . SID)), 
-                                                       'icon' => 'folder.gif', 
-                                                       'expandedIcon' => 'folder-expanded.gif',
-                                                       'linkTarget' => 'detail'));
-
-                       // Add folder to schema
-                       $schemanode->addItem($adv_node);                        
-               }
-               // Types
-               if ($data->hasTypes()) {
-                       $type_node = &new HTML_TreeNode(array(
-                                                       'text' => addslashes($lang['strtypes']), 
-                                                       'link' => addslashes(htmlspecialchars("types.php?{$querystr}")), 
-                                                       'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
-                                                       'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
-                                                       'expanded' => false,
-                                                       'linkTarget' => 'detail'));
-
-                       // Add folder to schema
-                       $adv_node->addItem($type_node);
-               }
-               // Operators
-               if ($data->hasOperators()) {
-                       $opr_node = &new HTML_TreeNode(array(
-                                                       'text' => addslashes($lang['stroperators']), 
-                                                       'link' => addslashes(htmlspecialchars("operators.php?{$querystr}")), 
-                                                       'icon' => "../../../images/themes/{$conf['theme']}/operators.png", 
-                                                       'expandedIcon' => "../../../images/themes/{$conf['theme']}/operators.png",
-                                                       'expanded' => false,
-                                                       'linkTarget' => 'detail'));
+               if ($conf['show_advanced']) {
+                       if ($data->hasTypes() || $data->hasOperators() || $data->hasConversions()) {
+                               $adv_node = &new HTML_TreeNode(array(
+                                                               'text' => $lang['stradvanced'], 
+                                                               'link' => addslashes(htmlspecialchars("schema.php?{$querystr}&" . SID)), 
+                                                               'icon' => 'folder.gif', 
+                                                               'expandedIcon' => 'folder-expanded.gif',
+                                                               'linkTarget' => 'detail'));
 
-                       // Add folder to schema
-                       $adv_node->addItem($opr_node);
-               }
-               // Conversions
-               if ($data->hasConversions()) {
-                       $con_node = &new HTML_TreeNode(array(
-                                                       'text' => addslashes($lang['strconversions']), 
-                                                       'link' => addslashes(htmlspecialchars("conversions.php?{$querystr}")), 
+                               // Add folder to schema
+                               $schemanode->addItem($adv_node);                        
+                       }
+                       // Types
+                       if ($data->hasTypes()) {
+                               $type_node = &new HTML_TreeNode(array(
+                                                               'text' => addslashes($lang['strtypes']), 
+                                                               'link' => addslashes(htmlspecialchars("types.php?{$querystr}")), 
                                                                'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
                                                                'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
-                                                       'expanded' => false,
-                                                       'linkTarget' => 'detail'));
+                                                               'expanded' => false,
+                                                               'linkTarget' => 'detail'));
 
-                       // Add folder to schema
-                       $adv_node->addItem($con_node);
+                               // Add folder to schema
+                               $adv_node->addItem($type_node);
+                       }
+                       // Operators
+                       if ($data->hasOperators()) {
+                               $opr_node = &new HTML_TreeNode(array(
+                                                               'text' => addslashes($lang['stroperators']), 
+                                                               'link' => addslashes(htmlspecialchars("operators.php?{$querystr}")), 
+                                                               'icon' => "../../../images/themes/{$conf['theme']}/operators.png", 
+                                                               'expandedIcon' => "../../../images/themes/{$conf['theme']}/operators.png",
+                                                               'expanded' => false,
+                                                               'linkTarget' => 'detail'));
+
+                               // Add folder to schema
+                               $adv_node->addItem($opr_node);
+                       }
+                       // Conversions
+                       if ($data->hasConversions()) {
+                               $con_node = &new HTML_TreeNode(array(
+                                                               'text' => addslashes($lang['strconversions']), 
+                                                               'link' => addslashes(htmlspecialchars("conversions.php?{$querystr}")), 
+                                                                       'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
+                                                                       'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
+                                                               'expanded' => false,
+                                                               'linkTarget' => 'detail'));
+
+                               // Add folder to schema
+                               $adv_node->addItem($con_node);
+                       }
                }
        }       
 
                        }
                        
                        // Languages
-                       if ($data->hasLanguages()) {            
-                               $lang_node = &new HTML_TreeNode(array(
-                                                               'text' => addslashes($lang['strlanguages']), 
-                                                               'link' => addslashes(htmlspecialchars("languages.php?{$querystr}")), 
-                                                               'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
-                                                               'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
-                                                               'expanded' => false,
-                                                               'linkTarget' => 'detail'));
+                       if ($conf['show_advanced']) {
+                               if ($data->hasLanguages()) {            
+                                       $lang_node = &new HTML_TreeNode(array(
+                                                                       'text' => addslashes($lang['strlanguages']), 
+                                                                       'link' => addslashes(htmlspecialchars("languages.php?{$querystr}")), 
+                                                                       'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
+                                                                       'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
+                                                                       'expanded' => false,
+                                                                       'linkTarget' => 'detail'));
 
-                               // Add folder to database
-                               $db_node->addItem($lang_node);
-                       }
-               
-                       // Casts
-                       if ($data->hasCasts()) {                
-                               $cast_node = &new HTML_TreeNode(array(
-                                                               'text' => addslashes($lang['strcasts']), 
-                                                               'link' => addslashes(htmlspecialchars("casts.php?{$querystr}")), 
-                                                               'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
-                                                               'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
-                                                               'expanded' => false,
-                                                               'linkTarget' => 'detail'));
+                                       // Add folder to database
+                                       $db_node->addItem($lang_node);
+                               }
+                       
+                               // Casts
+                               if ($data->hasCasts()) {                
+                                       $cast_node = &new HTML_TreeNode(array(
+                                                                       'text' => addslashes($lang['strcasts']), 
+                                                                       'link' => addslashes(htmlspecialchars("casts.php?{$querystr}")), 
+                                                                       'icon' => "../../../images/themes/{$conf['theme']}/types.png", 
+                                                                       'expandedIcon' => "../../../images/themes/{$conf['theme']}/types.png",
+                                                                       'expanded' => false,
+                                                                       'linkTarget' => 'detail'));
 
-                               // Add folder to database
-                               $db_node->addItem($cast_node);
+                                       // Add folder to database
+                                       $db_node->addItem($cast_node);
+                               }
                        }
                
                        // Add node to menu
index 80864dd7491530fd1adc9e14511c405047f05f8a..fd7a4f69599295d57743f906b00562c4accb6b43 100644 (file)
@@ -4,7 +4,7 @@
         * Central phpPgAdmin configuration.  As a user you may modify the
         * settings here for your particular configuration.
         *
-        * $Id: config.inc.php-dist,v 1.27 2003/09/30 07:43:08 chriskl Exp $
+        * $Id: config.inc.php-dist,v 1.28 2003/11/08 09:06:43 chriskl Exp $
         */
 
        // An example server.  Create as many of these as you wish,
        // (eg. Run 'SELECT * FROM pg_database' in the SQL area.)
        $conf['owned_only'] = false;
 
+       // Display "advanced" objects?  Setting this to false will hide types, operators
+       // conversions, languages and casts in phpPgAdmin.  These objects are rarely
+       // administered and can clutter the interface.
+       $conf['show_advanced'] = true;
+
        // Display "system" objects?
        $conf['show_system'] = false;
 
@@ -75,6 +80,6 @@
         * Don't modify anything below this line *
         *****************************************/
 
-       $conf['version'] = 10;
+       $conf['version'] = 11;
 
 ?>
index 6b411e6ae9533ac8817a69fc2dcf20ad31779750..6ec814bebf8914c26f026c0b81de60c5bbf462ef 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Function library read in upon startup
         *
-        * $Id: lib.inc.php,v 1.66 2003/10/08 01:43:14 chriskl Exp $
+        * $Id: lib.inc.php,v 1.67 2003/11/08 09:06:45 chriskl Exp $
         */
        
        // Set error reporting level to max
@@ -29,7 +29,7 @@
        // Configuration file version.  If this is greater than that in config.inc.php, then
        // the app will refuse to run.  This and $conf['version'] should be incremented whenever
        // backwards incompatible changes are made to config.inc.php-dist.
-       $conf['base_version'] = 10;
+       $conf['base_version'] = 11;
 
        // List of available language files
        $appLangFiles = array(