Now that you can actually see the functions, there are all kinds of problems handling...
authorxzilla <xzilla>
Wed, 10 Aug 2005 19:38:35 +0000 (19:38 +0000)
committerxzilla <xzilla>
Wed, 10 Aug 2005 19:38:35 +0000 (19:38 +0000)
Since there really arnt any privilges on these older servers, decided to hide the privileges link when applicable.
Will apply to head barring objections

classes/database/Postgres.php
classes/database/Postgres73.php
functions.php

index 9808338948c3054b9d0f295140649c1f62f29c1e..6fb8899675eca9532658aaf177a8587ed9d48667 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres.php,v 1.250.2.4 2005/08/10 05:54:35 chriskl Exp $
+ * $Id: Postgres.php,v 1.250.2.5 2005/08/10 19:38:35 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -4172,6 +4172,7 @@ class Postgres extends ADODB_base {
        function hasNamedParams() { return false; }
        function hasUserAndDbVariables() { return false; }
        function hasCompositeTypes() { return false; }
+       function hasFuncPrivs() { return false; }
 
 }
 
index 5de874e3acc1ba6145dbf95d3c05d2b3f74ecde8..9b84a10a5be050b6e5fdd6a013a61b23d0f0faab 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.140.2.4 2005/07/31 09:18:39 chriskl Exp $
+ * $Id: Postgres73.php,v 1.140.2.5 2005/08/10 19:38:35 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1796,6 +1796,7 @@ class Postgres73 extends Postgres72 {
        function hasViewColumnRename() { return true; }
        function hasUserAndDbVariables() { return true; }
        function hasCompositeTypes() { return true; }   
+       function hasFuncPrivs() { return true; }
 }
 
 ?>
index ded185b8d4be025074745620f0d62716bdf17d8b..5fd145a43c568acb4e9de0bf859a37f82e07000f 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage functions in a database
         *
-        * $Id: functions.php,v 1.47 2004/09/18 11:59:40 soranzo Exp $
+        * $Id: functions.php,v 1.47.2.1 2005/08/10 19:38:35 xzilla Exp $
         */
 
        // Include application functions
                                'url'   => "{$PHP_SELF}?action=confirm_drop&amp;{$misc->href}&amp;",
                                'vars'  => array('function' => '+proproto', 'function_oid' => 'prooid'),
                        ),
-                       'privileges' => array(
-                               'title' => $lang['strprivileges'],
-                               'url'   => "privileges.php?{$misc->href}&amp;subject=function&amp;",
-                               'vars'  => array('function' => '+proproto', 'function_oid' => 'prooid'),
+                       'privileges' => array(
+                           'title' => $lang['strprivileges'],
+                           'url'   => "privileges.php?{$misc->href}&amp;subject=function&amp;",
+                           'vars'  => array('function' => '+proproto', 'function_oid' => 'prooid'),
                        ),
                );
+
+        if (!$data->hasFuncPrivs()) { 
+                       array_pop($actions); 
+        }
                
                $misc->printTable($funcs, $columns, $actions, $lang['strnofunctions'], 'fnPre');