From 956d17bd8ee5fb7b27147b59d2cd5b901ee7e132 Mon Sep 17 00:00:00 2001 From: xzilla Date: Mon, 15 Aug 2005 17:15:36 +0000 Subject: [PATCH] Merge forward function privileges fix for pre 7.3 servers --- classes/database/Postgres.php | 3 ++- classes/database/Postgres73.php | 4 +++- functions.php | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 308bf3cd..ccbc97ac 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -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.272 2005/08/12 01:39:26 chriskl Exp $ + * $Id: Postgres.php,v 1.273 2005/08/15 17:15:36 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -4489,6 +4489,7 @@ class Postgres extends ADODB_base { function hasUserAndDbVariables() { return false; } function hasCompositeTypes() { return false; } function hasReadOnlyQueries() { return false; } + function hasFuncPrivs() { return false; } } diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php index 7ba5ac5b..e49cf518 100644 --- a/classes/database/Postgres73.php +++ b/classes/database/Postgres73.php @@ -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.149 2005/07/31 09:15:07 chriskl Exp $ + * $Id: Postgres73.php,v 1.150 2005/08/15 17:15:36 xzilla Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -1818,6 +1818,8 @@ class Postgres73 extends Postgres72 { function hasViewColumnRename() { return true; } function hasUserAndDbVariables() { return true; } function hasCompositeTypes() { return true; } + function hasFuncPrivs() { return true; } + } ?> diff --git a/functions.php b/functions.php index d24e0fad..f83d2087 100644 --- a/functions.php +++ b/functions.php @@ -3,7 +3,7 @@ /** * Manage functions in a database * - * $Id: functions.php,v 1.48 2005/05/02 15:47:23 chriskl Exp $ + * $Id: functions.php,v 1.49 2005/08/15 17:15:36 xzilla Exp $ */ // Include application functions @@ -522,6 +522,10 @@ 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), ), ); + + if ( !$data->hasFuncPrivs() ) { + unset($actions['privileges']); + } $misc->printTable($funcs, $columns, $actions, $lang['strnofunctions']); -- 2.39.5