Fix new PHP strict errors
authorchriskl <chriskl>
Sun, 31 Jul 2005 09:15:06 +0000 (09:15 +0000)
committerchriskl <chriskl>
Sun, 31 Jul 2005 09:15:06 +0000 (09:15 +0000)
classes/Misc.php
classes/Reports.php
classes/database/Postgres.php
classes/database/Postgres71.php
classes/database/Postgres72.php
classes/database/Postgres73.php
classes/database/Postgres74.php
classes/database/Postgres80.php
classes/database/Postgres81.php
libraries/lib.inc.php

index 3302def7f2f4839d60ffa03c9b02f5933ed79197..1abb323543cb825b95004d13d340b3eed913cc93 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.108 2005/07/31 08:40:26 chriskl Exp $
+        * $Id: Misc.php,v 1.109 2005/07/31 09:15:06 chriskl Exp $
         */
         
        class Misc {
                /**
                 * Creates a database accessor
                 */
-               function &getDatabaseAccessor($database, $server_id = null) {
+               function getDatabaseAccessor($database, $server_id = null) {
                        global $lang, $conf, $misc;
                        
                        $server_info = $this->getServerInfo($server_id);
                        }
                }
                
-               function &adjustTabsForTree(&$tabs) {
+               function adjustTabsForTree(&$tabs) {
                        include_once('classes/ArrayRecordSet.php');
                        
                        foreach ($tabs as $i => $tab) {
                 * @param $recordset return as RecordSet suitable for printTable if true,
                 *                   otherwise just return an array.
                 */
-               function &getServers($recordset = false) {
+               function getServers($recordset = false) {
                        global $conf;
                        
                        $srvs = isset($_SESSION['webdbLogin']) && is_array($_SESSION['webdbLogin']) ? $_SESSION['webdbLogin'] : array();
index 65fe2e1960cf9d8ab8174c2711c322a00a1277c2..36e766dbd49ebf77f1c0fcf568853f1205df5a03 100644 (file)
@@ -4,7 +4,7 @@
         * the functions provided by the database driver exclusively, and hence
         * will work with any database without modification.
         *
-        * $Id: Reports.php,v 1.12 2005/05/02 15:47:26 chriskl Exp $
+        * $Id: Reports.php,v 1.13 2005/07/31 09:15:06 chriskl Exp $
         */
 
        class Reports {
@@ -33,7 +33,7 @@
                 * Finds all reports
                 * @return A recordset
                 */
-               function &getReports() {
+               function getReports() {
                        global $conf, $misc;
                        // Filter for owned reports if necessary
                        if ($conf['owned_reports_only']) {
@@ -55,7 +55,7 @@
                 * @param $report_id The ID of the report to find
                 * @return A recordset
                 */
-               function &getReport($report_id) {                       
+               function getReport($report_id) {                        
                        $sql = $this->driver->getSelectSQL('ppa_reports',
                                array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql'),
                                array('report_id' => $report_id), array('report_id' => '='), array());
index 2dbd4e33017df5e11ede4d39fb910eed64e02143..b4244db9a40726dbb08150e608a6a8952f75ccd7 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.266 2005/07/26 08:53:00 chriskl Exp $
+ * $Id: Postgres.php,v 1.267 2005/07/31 09:15:06 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -181,7 +181,7 @@ class Postgres extends ADODB_base {
        /**
         * Initialize help pages and return the full list
         */
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc70.php');
                return $this->help_page;
        }
@@ -418,7 +418,7 @@ class Postgres extends ADODB_base {
         * Return all database available on the server
         * @return A list of databases, sorted alphabetically
         */
-       function &getDatabases($currentdatabase = NULL) {
+       function getDatabases($currentdatabase = NULL) {
                global $conf, $misc;
 
                $server_info = $misc->getServerInfo();
@@ -456,7 +456,7 @@ class Postgres extends ADODB_base {
         * @param string $database the name of the database to get the owner for
         * @return recordset of the db owner info
         */
-       function &getDatabaseOwner($database) {
+       function getDatabaseOwner($database) {
                $this->clean($database);
                $sql = "SELECT usename FROM pg_user, pg_database WHERE pg_user.usesysid = pg_database.datdba AND pg_database.datname = '{$database}' ";
                return $this->selectSet($sql);
@@ -467,7 +467,7 @@ class Postgres extends ADODB_base {
         * @param $database The name of the database to retrieve
         * @return The database info
         */
-       function &getDatabase($database) {
+       function getDatabase($database) {
                $this->clean($database);
                $sql = "SELECT * FROM pg_database WHERE datname='{$database}'";
                return $this->selectSet($sql);
@@ -551,7 +551,7 @@ class Postgres extends ADODB_base {
         * @param $table The table to find the parents for
         * @return A recordset
         */
-       function &getTableParents($table) {
+       function getTableParents($table) {
                $this->clean($table);
                
                $sql = "
@@ -575,7 +575,7 @@ class Postgres extends ADODB_base {
         * @param $table The table to find the children for
         * @return A recordset
         */
-       function &getTableChildren($table) {
+       function getTableChildren($table) {
                $this->clean($table);
                
                $sql = "
@@ -598,7 +598,7 @@ class Postgres extends ADODB_base {
         * @param $table The name of the table
         * @return A recordset
         */
-       function &getTable($table) {
+       function getTable($table) {
                $this->clean($table);
                                
                $sql = "SELECT pc.relname, 
@@ -616,7 +616,7 @@ class Postgres extends ADODB_base {
         * @param $all True to fetch all tables, false for just in current schema
         * @return All tables, sorted alphabetically 
         */
-       function &getTables($all = false) {
+       function getTables($all = false) {
                global $conf;
                if (!$conf['show_system'] || $all) $where = "AND c.relname NOT LIKE 'pg\\\\_%' ";
                else $where = '';
@@ -639,7 +639,7 @@ class Postgres extends ADODB_base {
         * @param $field (optional) The name of a field to return
         * @return All attributes in order
         */
-       function &getTableAttributes($table, $field = '') {
+       function getTableAttributes($table, $field = '') {
                $this->clean($table);
                $this->clean($field);
                
@@ -959,7 +959,7 @@ class Postgres extends ADODB_base {
         * @return A string containing the formatted SQL code
         * @return null On error
         */
-       function &getTableDefPrefix($table, $clean = false) {
+       function getTableDefPrefix($table, $clean = false) {
                // Fetch table
                $t = &$this->getTable($table);
                if (!is_object($t) || $t->recordCount() != 1) {
@@ -1267,7 +1267,7 @@ class Postgres extends ADODB_base {
         * @return A string containing the formatted SQL code
         * @return null On error
         */
-       function &getTableDefSuffix($table) {
+       function getTableDefSuffix($table) {
                $sql = '';
 
                // Indexes
@@ -1747,7 +1747,7 @@ class Postgres extends ADODB_base {
         * @param $key The associative array holding the key to retrieve
         * @return A recordset
         */
-       function &browseRow($table, $key) {
+       function browseRow($table, $key) {
                $this->fieldClean($table);
 
                $sql = "SELECT * FROM \"{$table}\"";
@@ -1813,7 +1813,7 @@ class Postgres extends ADODB_base {
         * Returns all sequences in the current database
         * @return A recordset
         */
-       function &getSequences($all = false) {
+       function getSequences($all = false) {
                // $all argument is ignored as it makes no difference
                $sql = "SELECT
                                        c.relname AS seqname,
@@ -1830,7 +1830,7 @@ class Postgres extends ADODB_base {
         * @param $sequence Sequence name
         * @return A recordset
         */
-       function &getSequence($sequence) {
+       function getSequence($sequence) {
                $temp = $sequence;
                // Need both field cleaned and literal cleaned versions
                $this->fieldClean($sequence);
@@ -1864,7 +1864,7 @@ class Postgres extends ADODB_base {
         * @return 0 success
         * @return -1 sequence not found
         */
-       function &resetSequence($sequence) {
+       function resetSequence($sequence) {
                // Get the minimum value of the sequence
                $seq = &$this->getSequence($sequence);
                if ($seq->recordCount() != 1) return -1;
@@ -1917,7 +1917,7 @@ class Postgres extends ADODB_base {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getConstraints($table) {
+       function getConstraints($table) {
                $this->clean($table);
 
                $status = $this->beginTransaction();
@@ -2138,7 +2138,7 @@ class Postgres extends ADODB_base {
         * @param $table The table to find referrers for
         * @return A recordset
         */
-       function &getReferrers($table) {
+       function getReferrers($table) {
                // In PostgreSQL < 7.3, there is no way to discover foreign keys
                return -99;
        }
@@ -2151,7 +2151,7 @@ class Postgres extends ADODB_base {
         * @param $unique Only get unique/pk indexes
         * @return A recordset
         */
-       function &getIndexes($table = '', $unique = false) {
+       function getIndexes($table = '', $unique = false) {
                $this->clean($table);
                $sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, pg_get_indexdef(i.indexrelid) AS inddef
                        FROM pg_class c, pg_class c2, pg_index i
@@ -2237,7 +2237,7 @@ class Postgres extends ADODB_base {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getRules($table) {
+       function getRules($table) {
                $this->clean($table);
 
                $sql = "SELECT
@@ -2342,7 +2342,7 @@ class Postgres extends ADODB_base {
         * Returns a list of all views in the database
         * @return All views
         */
-       function &getViews() {
+       function getViews() {
                global $conf;
 
                if (!$conf['show_system'])
@@ -2365,7 +2365,7 @@ class Postgres extends ADODB_base {
         * @param $view The name of the view to retrieve
         * @return View info
         */
-       function &getView($view) {
+       function getView($view) {
                $this->clean($view);
                
                $sql = "SELECT viewname AS relname, viewowner AS relowner, definition AS vwdefinition,
@@ -2466,7 +2466,7 @@ class Postgres extends ADODB_base {
         * Returns a list of all operators in the database
         * @return All operators
         */
-       function &getOperators() {
+       function getOperators() {
                global $conf;
                if (!$conf['show_system'])
                        $where = "WHERE po.oid > '{$this->_lastSystemOID}'::oid";
@@ -2568,7 +2568,7 @@ class Postgres extends ADODB_base {
         * Returns all users in the database cluster
         * @return All users
         */
-       function &getUsers() {
+       function getUsers() {
                $sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires";
                if ($this->hasUserSessionDefaults()) $sql .= ", useconfig";
                $sql .= " FROM pg_user ORDER BY usename";
@@ -2581,7 +2581,7 @@ class Postgres extends ADODB_base {
         * @param $username The username of the user to retrieve
         * @return The user's data
         */
-       function &getUser($username) {
+       function getUser($username) {
                $this->clean($username);
                
                $sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires";
@@ -2681,7 +2681,7 @@ class Postgres extends ADODB_base {
         * Returns all groups in the database cluser
         * @return All groups
         */
-       function &getGroups() {
+       function getGroups() {
                $sql = "SELECT groname FROM pg_group ORDER BY groname";
                
                return $this->selectSet($sql);
@@ -2692,7 +2692,7 @@ class Postgres extends ADODB_base {
         * @param $groname The name of the group
         * @return All users in the group
         */
-       function &getGroup($groname) {
+       function getGroup($groname) {
                $this->clean($groname);
 
                $sql = "SELECT grolist FROM pg_group WHERE groname = '{$groname}'";
@@ -2781,7 +2781,7 @@ class Postgres extends ADODB_base {
         * @param $domains Ignored
         * @return A recordet
         */
-       function &getTypes($all = false, $tabletypes = false, $domains = false) {
+       function getTypes($all = false, $tabletypes = false, $domains = false) {
                global $conf;
                
                if ($all || $conf['show_system']) {
@@ -2821,7 +2821,7 @@ class Postgres extends ADODB_base {
         * @param $typname The name of the view to retrieve
         * @return Type info
         */
-       function &getType($typname) {
+       function getType($typname) {
                $this->clean($typname);
                
                $sql = "SELECT *, typinput AS typin, typoutput AS typout 
@@ -2881,7 +2881,7 @@ class Postgres extends ADODB_base {
         * @param $trigger An array containing fields from the trigger table
         * @return The trigger definition string
         */
-       function &getTriggerDef($trigger) {
+       function getTriggerDef($trigger) {
                // Constants to figure out tgtype
 
                if (!defined('TRIGGER_TYPE_ROW')) define ('TRIGGER_TYPE_ROW', (1 << 0));
@@ -2978,7 +2978,7 @@ class Postgres extends ADODB_base {
         * @param $table The name of a table whose triggers to retrieve
         * @return A recordset
         */
-       function &getTriggers($table = '') {
+       function getTriggers($table = '') {
                $this->clean($table);
 
                // We include constraint triggers
@@ -3367,7 +3367,7 @@ class Postgres extends ADODB_base {
         * @param $all If true, will find all available functions, if false just userland ones
         * @return All functions
         */
-       function &getFunctions($all = false) {
+       function getFunctions($all = false) {
                global $conf;
                
                if ($all || $conf['show_system'])
@@ -3418,7 +3418,7 @@ class Postgres extends ADODB_base {
        /**
         * Returns a list of all functions that can be used in triggers
         */
-       function &getTriggerFunctions() {
+       function getTriggerFunctions() {
                return $this->getFunctions(true);
        }
 
@@ -3606,7 +3606,7 @@ class Postgres extends ADODB_base {
         * @param $all True to get all languages, regardless of show_system
         * @return A recordset
         */
-       function &getLanguages($all = false) {
+       function getLanguages($all = false) {
                global $conf;
                
                if ($conf['show_system'] || $all)
@@ -3635,7 +3635,7 @@ class Postgres extends ADODB_base {
         * Gets all aggregates
         * @return A recordset
         */
-       function &getAggregates() {
+       function getAggregates() {
                global $conf;
                
                if ($conf['show_system'])
@@ -3667,7 +3667,7 @@ class Postgres extends ADODB_base {
         * Gets all opclasses
         * @return A recordset
         */
-       function &getOpClasses() {
+       function getOpClasses() {
                global $conf;
                
                if ($conf['show_system'])
@@ -3920,7 +3920,7 @@ class Postgres extends ADODB_base {
         * @return -3 page or page_size invalid
         * @return -4 unknown type
         */
-       function &browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) {
+       function browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) {
                // Check that we're not going to divide by zero
                if (!is_numeric($page_size) || $page_size != (int)$page_size || $page_size <= 0) return -3;
 
@@ -4004,7 +4004,7 @@ class Postgres extends ADODB_base {
         * @return A recordset on success
         * @return -1 Failed to set datestyle
         */
-       function &dumpRelation($relation, $oids) {
+       function dumpRelation($relation, $oids) {
                $this->fieldClean($relation);
                
                // Actually retrieve the rows
index bf35f02fbd1eb9b4ecbf2008c38e133f6a07258a..33af4133fe07772a942d6f4a80ac2b9b5fcc972a 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.71 2005/05/02 15:47:26 chriskl Exp $
+ * $Id: Postgres71.php,v 1.72 2005/07/31 09:15:06 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -61,7 +61,7 @@ class Postgres71 extends Postgres {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc71.php');
                return $this->help_page;
        }
@@ -85,7 +85,7 @@ class Postgres71 extends Postgres {
         * Return all database available on the server
         * @return A list of databases, sorted alphabetically
         */
-       function &getDatabases($currentdatabase = NULL) {
+       function getDatabases($currentdatabase = NULL) {
                global $conf, $misc;
                
                $server_info = $misc->getServerInfo();
@@ -138,7 +138,7 @@ class Postgres71 extends Postgres {
         * @param $field (optional) The name of a field to return
         * @return All attributes in order
         */
-       function &getTableAttributes($table, $field = '') {
+       function getTableAttributes($table, $field = '') {
                $this->clean($table);
                $this->clean($field);
                
@@ -192,7 +192,7 @@ class Postgres71 extends Postgres {
         * @return 0 success
         * @return -1 sequence not found
         */
-       function &resetSequence($sequence) {
+       function resetSequence($sequence) {
                // Get the minimum value of the sequence
                $seq = &$this->getSequence($sequence);
                if ($seq->recordCount() != 1) return -1;
@@ -271,7 +271,7 @@ class Postgres71 extends Postgres {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getConstraints($table) {
+       function getConstraints($table) {
                $this->clean($table);
 
                $status = $this->beginTransaction();
@@ -320,7 +320,7 @@ class Postgres71 extends Postgres {
         * @param $table The name of a table whose triggers to retrieve
         * @return A recordset
         */
-       function &getTriggers($table = '') {
+       function getTriggers($table = '') {
                $this->clean($table);
 
                // We include constraint triggers
@@ -342,7 +342,7 @@ class Postgres71 extends Postgres {
         * Gets all aggregates
         * @return A recordset
         */
-       function &getAggregates() {
+       function getAggregates() {
                global $conf;
                
                if ($conf['show_system'])
index 54d850a8fa9992a8a20846f94d175f605708ea4c..7120b5cfbb90023f1203a9afcb5f5139da4b8ea9 100644 (file)
@@ -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.79 2005/05/02 15:47:26 chriskl Exp $
+ * $Id: Postgres72.php,v 1.80 2005/07/31 09:15:06 chriskl Exp $
  */
 
 
@@ -40,7 +40,7 @@ class Postgres72 extends Postgres71 {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc72.php');
                return $this->help_page;
        }
@@ -50,7 +50,7 @@ class Postgres72 extends Postgres71 {
         * @param $database (optional) Find only connections to specified database
         * @return A recordset
         */
-       function &getProcesses($database = null) {
+       function getProcesses($database = null) {
                if ($database === null)
                        $sql = "SELECT * FROM pg_stat_activity ORDER BY datname, usename, procpid";
                else {
@@ -97,7 +97,7 @@ class Postgres72 extends Postgres71 {
         * @param $table The name of the table
         * @return A recordset
         */
-       function &getTable($table) {
+       function getTable($table) {
                $this->clean($table);
                                
                $sql = "SELECT pc.relname, 
@@ -115,7 +115,7 @@ class Postgres72 extends Postgres71 {
         * @param $all True to fetch all tables, false for just in current schema
         * @return All tables, sorted alphabetically 
         */
-       function &getTables($all = false) {
+       function getTables($all = false) {
                global $conf;
                if (!$conf['show_system'] || $all) $where = "AND c.relname NOT LIKE 'pg\\\\_%' ";
                else $where = '';
@@ -134,7 +134,7 @@ class Postgres72 extends Postgres71 {
         * @param $field (optional) The name of a field to return
         * @return All attributes in order
         */
-       function &getTableAttributes($table, $field = '') {
+       function getTableAttributes($table, $field = '') {
                $this->clean($table);
                $this->clean($field);
 
@@ -185,7 +185,7 @@ class Postgres72 extends Postgres71 {
         * Returns a list of all views in the database
         * @return All views
         */
-       function &getViews() {
+       function getViews() {
                global $conf;
 
                if (!$conf['show_system'])
@@ -208,7 +208,7 @@ class Postgres72 extends Postgres71 {
         * @param $view The name of the view to retrieve
         * @return View info
         */
-       function &getView($view) {
+       function getView($view) {
                $this->clean($view);
                
                $sql = "SELECT viewname AS relname, viewowner AS relowner, definition AS vwdefinition,
@@ -312,7 +312,7 @@ class Postgres72 extends Postgres71 {
         * @param $all If true, will find all available functions, if false just userland ones
         * @return All functions
         */
-       function &getFunctions($all = false) {
+       function getFunctions($all = false) {
                if ($all)
                        $where = '';
                else
@@ -408,7 +408,7 @@ class Postgres72 extends Postgres71 {
         * @param $domains Ignored
         * @return A recordet
         */
-       function &getTypes($all = false, $tabletypes = false, $domains = false) {
+       function getTypes($all = false, $tabletypes = false, $domains = false) {
                global $conf;
                
                if ($all || $conf['show_system']) {
@@ -488,7 +488,7 @@ class Postgres72 extends Postgres71 {
         * @param $database The database to fetch stats for
         * @return A recordset
         */
-       function &getStatsDatabase($database) {
+       function getStatsDatabase($database) {
                $this->clean($database);
 
                $sql = "SELECT * FROM pg_stat_database WHERE datname='{$database}'";
@@ -501,7 +501,7 @@ class Postgres72 extends Postgres71 {
         * @param $table The table to fetch stats for
         * @return A recordset
         */
-       function &getStatsTableTuples($table) {
+       function getStatsTableTuples($table) {
                $this->clean($table);
 
                $sql = 'SELECT * FROM pg_stat_all_tables WHERE';
@@ -516,7 +516,7 @@ class Postgres72 extends Postgres71 {
         * @param $table The table to fetch stats for
         * @return A recordset
         */
-       function &getStatsTableIO($table) {
+       function getStatsTableIO($table) {
                $this->clean($table);
 
                $sql = 'SELECT * FROM pg_statio_all_tables WHERE';
@@ -531,7 +531,7 @@ class Postgres72 extends Postgres71 {
         * @param $table The table to fetch index stats for
         * @return A recordset
         */
-       function &getStatsIndexTuples($table) {
+       function getStatsIndexTuples($table) {
                $this->clean($table);
 
                $sql = 'SELECT * FROM pg_stat_all_indexes WHERE';
@@ -546,7 +546,7 @@ class Postgres72 extends Postgres71 {
         * @param $table The table to fetch index stats for
         * @return A recordset
         */
-       function &getStatsIndexIO($table) {
+       function getStatsIndexIO($table) {
                $this->clean($table);
 
                $sql = 'SELECT * FROM pg_statio_all_indexes WHERE';
index 3e00a18e79382125cf9f1c1aa0533947491cb358..7ba5ac5b000cb746f16050d88266e9bf9e82ed86 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.148 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres73.php,v 1.149 2005/07/31 09:15:07 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -54,7 +54,7 @@ class Postgres73 extends Postgres72 {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc73.php');
                return $this->help_page;
        }
@@ -115,7 +115,7 @@ class Postgres73 extends Postgres72 {
         * Return all schemas in the current database
         * @return All schemas, sorted alphabetically - but with PUBLIC first (if it exists)
         */
-       function &getSchemas() {
+       function getSchemas() {
                global $conf, $slony;
 
                if (!$conf['show_system']) {
@@ -140,7 +140,7 @@ class Postgres73 extends Postgres72 {
         * @param $schema The name of the schema
         * @return Schema information
         */
-       function &getSchemaByName($schema) {
+       function getSchemaByName($schema) {
                $this->clean($schema);
                $sql = "SELECT nspname, nspowner, nspacl, pg_catalog.obj_description(pn.oid, 'pg_namespace') as nspcomment
                         FROM pg_catalog.pg_namespace pn
@@ -215,7 +215,7 @@ class Postgres73 extends Postgres72 {
         * Returns all available variable information.
         * @return A recordset
         */
-       function &getVariables() {
+       function getVariables() {
                $sql = "SHOW ALL";
                
                return $this->selectSet($sql);
@@ -226,7 +226,7 @@ class Postgres73 extends Postgres72 {
         * @param $database (optional) Find only connections to specified database
         * @return A recordset
         */
-       function &getProcesses($database = null) {
+       function getProcesses($database = null) {
                if ($database === null)
                        $sql = "SELECT * FROM pg_catalog.pg_stat_activity ORDER BY datname, usename, procpid";
                else {
@@ -346,7 +346,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The name of the table
         * @return A recordset
         */
-       function &getTable($table) {
+       function getTable($table) {
                $this->clean($table);
                
                $sql = "
@@ -368,7 +368,7 @@ class Postgres73 extends Postgres72 {
         * @param $all True to fetch all tables, false for just in current schema
         * @return All tables, sorted alphabetically 
         */
-       function &getTables($all = false) {
+       function getTables($all = false) {
                if ($all) {
                        // Exclude pg_catalog and information_schema tables
                        $sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner
@@ -395,7 +395,7 @@ class Postgres73 extends Postgres72 {
         * @param $field (optional) The name of a field to return
         * @return All attributes in order
         */
-       function &getTableAttributes($table, $field = '') {
+       function getTableAttributes($table, $field = '') {
                $this->clean($table);
                $this->clean($field);
 
@@ -499,7 +499,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The table to find the parents for
         * @return A recordset
         */
-       function &getTableParents($table) {
+       function getTableParents($table) {
                $this->clean($table);
                
                $sql = "
@@ -525,7 +525,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The table to find the children for
         * @return A recordset
         */
-       function &getTableChildren($table) {
+       function getTableChildren($table) {
                $this->clean($table);
                
                $sql = "
@@ -563,7 +563,7 @@ class Postgres73 extends Postgres72 {
         * @param $view The name of the view to retrieve
         * @return View info
         */
-       function &getView($view) {
+       function getView($view) {
                $this->clean($view);
 
                $sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, 
@@ -594,7 +594,7 @@ class Postgres73 extends Postgres72 {
         * Returns all sequences in the current database
         * @return A recordset
         */
-       function &getSequences($all = false) {
+       function getSequences($all = false) {
                if ($all) {
                        // Exclude pg_catalog and information_schema tables
                        $sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner
@@ -618,7 +618,7 @@ class Postgres73 extends Postgres72 {
         * @param $sequence Sequence name
         * @return A recordset
         */
-       function &getSequence($sequence) {
+       function getSequence($sequence) {
                $this->fieldClean($sequence);
        
                $sql = "SELECT sequence_name AS seqname, *, pg_catalog.obj_description(s.tableoid, 'pg_class') AS seqcomment FROM \"{$sequence}\" AS s"; 
@@ -632,7 +632,7 @@ class Postgres73 extends Postgres72 {
         * @param $unique Only get unique/pk indexes
         * @return A recordset
         */
-       function &getIndexes($table = '', $unique = false) {
+       function getIndexes($table = '', $unique = false) {
                $this->clean($table);
                
                $sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered,
@@ -653,7 +653,7 @@ class Postgres73 extends Postgres72 {
         * @param $trigger The name of the trigger to retrieve
         * @return A recordset
         */
-       function &getTrigger($table, $trigger) {
+       function getTrigger($table, $trigger) {
                $this->clean($table);
                $this->clean($trigger);
 
@@ -671,7 +671,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The name of a table whose triggers to retrieve
         * @return A recordset
         */
-       function &getTriggers($table = '') {
+       function getTriggers($table = '') {
                $this->clean($table);
 
                $sql = "SELECT t.tgname, t.tgisconstraint, t.tgdeferrable, t.tginitdeferred, t.tgtype, 
@@ -717,7 +717,7 @@ class Postgres73 extends Postgres72 {
         *
         * @return All functions
         */
-       function &getFunctions($all = false, $type = null) {
+       function getFunctions($all = false, $type = null) {
                if ($all) {
                        $where = 'pg_catalog.pg_function_is_visible(p.oid)';
                        $distinct = 'DISTINCT ON (p.proname)';
@@ -823,7 +823,7 @@ class Postgres73 extends Postgres72 {
        /**
         * Returns a list of all functions that can be used in triggers
         */
-       function &getTriggerFunctions() {
+       function getTriggerFunctions() {
                return $this->getFunctions(true, 'trigger');
        }
 
@@ -889,7 +889,7 @@ class Postgres73 extends Postgres72 {
         * @param $domains If true, will include domains
         * @return A recordet
         */
-       function &getTypes($all = false, $tabletypes = false, $domains = false) {
+       function getTypes($all = false, $tabletypes = false, $domains = false) {
                if ($all)
                        $where = 'pg_catalog.pg_type_is_visible(t.oid)';
                else
@@ -1042,7 +1042,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getRules($table) {
+       function getRules($table) {
                $this->clean($table);
 
                $sql = "SELECT 
@@ -1083,7 +1083,7 @@ class Postgres73 extends Postgres72 {
         * @return An array of linked tables and columns
         * @return -1 $tables isn't an array
         */
-        function &getLinkingKeys($tables) {
+        function getLinkingKeys($tables) {
                if (!is_array($tables)) return -1;
 
                
@@ -1162,7 +1162,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getConstraints($table) {
+       function getConstraints($table) {
                $this->clean($table);
 
                /* This query finds all foreign key and check constraints in the pg_constraint
@@ -1241,7 +1241,7 @@ class Postgres73 extends Postgres72 {
         * @param $table The table to find referrers for
         * @return A recordset
         */
-       function &getReferrers($table) {
+       function getReferrers($table) {
                $this->clean($table);
 
                $status = $this->beginTransaction();
@@ -1327,7 +1327,7 @@ class Postgres73 extends Postgres72 {
         * @param $domain The name of the domain to fetch
         * @return A recordset
         */
-       function &getDomain($domain) {
+       function getDomain($domain) {
                $this->clean($domain);
                
                $sql = "
@@ -1353,7 +1353,7 @@ class Postgres73 extends Postgres72 {
         * Return all domains in current schema.  Excludes domain constraints.
         * @return All tables, sorted alphabetically 
         */
-       function &getDomains() {
+       function getDomains() {
                $sql = "                
                        SELECT
                                t.typname AS domname, 
@@ -1583,7 +1583,7 @@ class Postgres73 extends Postgres72 {
         * Returns a list of all operators in the database
         * @return All operators
         */      
-       function &getOperators() {
+       function getOperators() {
                // We stick with the subselects here, as you cannot ORDER BY a regtype
                $sql = "
                        SELECT
@@ -1644,7 +1644,7 @@ class Postgres73 extends Postgres72 {
         * Returns a list of all casts in the database
         * @return All casts
         */      
-       function &getCasts() {
+       function getCasts() {
                global $conf;
                                
                if ($conf['show_system'])
@@ -1687,7 +1687,7 @@ class Postgres73 extends Postgres72 {
         * Returns a list of all conversions in the database
         * @return All conversions
         */      
-       function &getConversions() {
+       function getConversions() {
                $sql = "
                        SELECT
                               c.conname,
@@ -1711,7 +1711,7 @@ class Postgres73 extends Postgres72 {
         * @param $all True to get all languages, regardless of show_system
         * @return A recordset
         */
-       function &getLanguages($all = false) {
+       function getLanguages($all = false) {
                global $conf;
                
                if ($conf['show_system'] || $all)
@@ -1740,7 +1740,7 @@ class Postgres73 extends Postgres72 {
         * Gets all aggregates
         * @return A recordset
         */
-       function &getAggregates() {
+       function getAggregates() {
                $sql = "
                        SELECT
                                p.proname,
@@ -1767,7 +1767,7 @@ class Postgres73 extends Postgres72 {
         * Gets all opclasses
         * @return A recordset
         */
-       function &getOpClasses() {
+       function getOpClasses() {
                $sql = "
                        SELECT
                                pa.amname,
index 73427539ba72e5dd05072c7a86ab2091bcff6cd5..2978937d2d4fca958b2c22a7567fc5e311bd3dde 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres74.php,v 1.46 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres74.php,v 1.47 2005/07/31 09:15:07 chriskl Exp $
  */
 
 include_once('./classes/database/Postgres73.php');
@@ -30,7 +30,7 @@ class Postgres74 extends Postgres73 {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc74.php');
                return $this->help_page;
        }
@@ -151,7 +151,7 @@ class Postgres74 extends Postgres73 {
         * @param $groname The name of the group
         * @return All users in the group
         */
-       function &getGroup($groname) {
+       function getGroup($groname) {
                $this->clean($groname);
 
                $sql = "SELECT s.usename FROM pg_catalog.pg_user s, pg_catalog.pg_group g 
@@ -168,7 +168,7 @@ class Postgres74 extends Postgres73 {
         * in 7.3 only in that it considers the information_schema to be a system schema.
         * @return All schemas, sorted alphabetically
         */
-       function &getSchemas() {
+       function getSchemas() {
                global $conf, $slony;
 
                if (!$conf['show_system']) {
@@ -197,7 +197,7 @@ class Postgres74 extends Postgres73 {
         * @param $unique Only get unique/pk indexes
         * @return A recordset
         */
-       function &getIndexes($table = '', $unique = false) {
+       function getIndexes($table = '', $unique = false) {
                $this->clean($table);
 
                $sql = "SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered,
@@ -219,7 +219,7 @@ class Postgres74 extends Postgres73 {
         * @param $view The name of the view to retrieve
         * @return View info
         */
-       function &getView($view) {
+       function getView($view) {
                $this->clean($view);
                
                $sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, 
@@ -238,7 +238,7 @@ class Postgres74 extends Postgres73 {
         * @param $table The name of a table whose triggers to retrieve
         * @return A recordset
         */
-       function &getTriggers($table = '') {
+       function getTriggers($table = '') {
                $this->clean($table);
 
                $sql = "SELECT t.tgname, pg_catalog.pg_get_triggerdef(t.oid) AS tgdef
@@ -260,7 +260,7 @@ class Postgres74 extends Postgres73 {
         * @param $table The table to find rules for
         * @return A recordset
         */
-       function &getConstraints($table) {
+       function getConstraints($table) {
                $this->clean($table);
 
                // This SQL is greatly complicated by the need to retrieve
@@ -321,7 +321,7 @@ class Postgres74 extends Postgres73 {
         * @param $domain The name of the domain whose constraints to fetch
         * @return A recordset
         */
-       function &getDomainConstraints($domain) {
+       function getDomainConstraints($domain) {
                $this->clean($domain);
                
                $sql = "
index c18f2b5975bc444fce277fbd2ea8672fc21b60f8..c246464b904b42c3327516d4d2c262d9beb8f874 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * PostgreSQL 8.0 support
  *
- * $Id: Postgres80.php,v 1.16 2005/07/26 18:49:19 xzilla Exp $
+ * $Id: Postgres80.php,v 1.17 2005/07/31 09:15:07 chriskl Exp $
  */
 
 include_once('./classes/database/Postgres74.php');
@@ -36,7 +36,7 @@ class Postgres80 extends Postgres74 {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc80.php');
                return $this->help_page;
        }
@@ -47,7 +47,7 @@ class Postgres80 extends Postgres74 {
         * Return all database available on the server
         * @return A list of databases, sorted alphabetically
         */
-       function &getDatabases($currentdatabase = NULL) {
+       function getDatabases($currentdatabase = NULL) {
                global $conf, $misc;
                
                $server_info = $misc->getServerInfo();
@@ -141,7 +141,7 @@ class Postgres80 extends Postgres74 {
         * @param $all True to fetch all tables, false for just in current schema
         * @return All tables, sorted alphabetically 
         */
-       function &getTables($all = false) {
+       function getTables($all = false) {
                if ($all) {
                        // Exclude pg_catalog and information_schema tables
                        $sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner
@@ -168,7 +168,7 @@ class Postgres80 extends Postgres74 {
         * @param $table The name of the table
         * @return A recordset
         */
-       function &getTable($table) {
+       function getTable($table) {
                $this->clean($table);
                
                $sql = "
@@ -306,7 +306,7 @@ class Postgres80 extends Postgres74 {
         * Returns all sequences in the current database
         * @return A recordset
         */
-       function &getSequences($all = false) {
+       function getSequences($all = false) {
                if ($all) {
                        // Exclude pg_catalog and information_schema tables
                        $sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner
index 26daa7e219a86a184559d78fdc7a3717894b138b..8a4e3c403e186745ff560f5aefd4aef0b1c52a98 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * PostgreSQL 8.1 support
  *
- * $Id: Postgres81.php,v 1.1 2005/03/15 02:44:10 chriskl Exp $
+ * $Id: Postgres81.php,v 1.2 2005/07/31 09:15:07 chriskl Exp $
  */
 
 include_once('./classes/database/Postgres80.php');
@@ -63,7 +63,7 @@ class Postgres81 extends Postgres80 {
 
        // Help functions
        
-       function &getHelpPages() {
+       function getHelpPages() {
                include_once('./help/PostgresDoc81.php');
                return $this->help_page;
        }
index 9ba75ce7964bc018f15521b9a636021189a2f2f8..899edc876cf8f8a15884ff0a81523a04486c96d3 100644 (file)
@@ -3,16 +3,13 @@
        /**
         * Function library read in upon startup
         *
-        * $Id: lib.inc.php,v 1.100 2005/07/31 08:40:26 chriskl Exp $
+        * $Id: lib.inc.php,v 1.101 2005/07/31 09:15:07 chriskl Exp $
         */
        include_once('decorator.inc.php');
        include_once('./lang/translations.php');
        
-       // Set error reporting level to max, no strict
-       if (defined('E_STRICT'))
-               error_reporting(E_ALL & !E_STRICT);
-       else
-               error_reporting(E_ALL);
+       // Set error reporting level to max
+       error_reporting(E_ALL);
 
        // Application name 
        $appName = 'phpPgAdmin';