From f8f43e227f50a57d3a0e66f6c33742925a25a089 Mon Sep 17 00:00:00 2001 From: chriskl Date: Wed, 3 Sep 2003 06:27:56 +0000 Subject: [PATCH] getTypes wasn't respecting show_system config var --- classes/database/Postgres72.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classes/database/Postgres72.php b/classes/database/Postgres72.php index 93164cdd..8fe737ae 100644 --- a/classes/database/Postgres72.php +++ b/classes/database/Postgres72.php @@ -4,7 +4,7 @@ * A class that implements the DB interface for Postgres * Note: This class uses ADODB and returns RecordSets. * - * $Id: Postgres72.php,v 1.48 2003/08/12 08:18:54 chriskl Exp $ + * $Id: Postgres72.php,v 1.49 2003/09/03 06:27:56 chriskl Exp $ */ @@ -233,6 +233,13 @@ class Postgres72 extends Postgres71 { * @return A recordet */ function &getTypes($all = false) { + global $conf; + + if ($all || $conf['show_system']) + $where = ''; + else + $where = "AND pt.oid > '{$this->_lastSystemOID}'::oid"; + $sql = "SELECT format_type(pt.oid, NULL) AS typname, pu.usename AS typowner @@ -242,6 +249,7 @@ class Postgres72 extends Postgres71 { WHERE pt.typowner = pu.usesysid AND typrelid = 0 + {$where} UNION SELECT pt.typname, @@ -253,6 +261,7 @@ class Postgres72 extends Postgres71 { pt.typowner = pu.usesysid AND typrelid = 0 AND typname !~ '^_.*' + {$where} ORDER BY typname "; -- 2.39.5