diff options
author | David M <davidmj@users.sourceforge.net> | 2008-01-03 17:00:40 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2008-01-03 17:00:40 +0000 |
commit | 85055ac97fa57ca339924cef719115d85bdf6c2e (patch) | |
tree | 1e19230af2689c3837356c0f7947719c0cdf67ef /phpBB/includes/db/postgres.php | |
parent | 0f26ffbadea13d97b841dfe56b21da7a5479000a (diff) | |
download | forums-85055ac97fa57ca339924cef719115d85bdf6c2e.tar forums-85055ac97fa57ca339924cef719115d85bdf6c2e.tar.gz forums-85055ac97fa57ca339924cef719115d85bdf6c2e.tar.bz2 forums-85055ac97fa57ca339924cef719115d85bdf6c2e.tar.xz forums-85055ac97fa57ca339924cef719115d85bdf6c2e.zip |
oh boy...
- Migrate code base to PHP 5.1+
git-svn-id: file:///svn/phpbb/trunk@8295 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r-- | phpBB/includes/db/postgres.php | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index bb689a7394..0ac27023f3 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -82,21 +82,7 @@ class dbal_postgres extends dbal if ($this->db_connect_id) { // determine what version of PostgreSQL is running, we can be more efficient if they are running 8.2+ - if (version_compare(PHP_VERSION, '5.0.0', '>=')) - { - $this->pgsql_version = @pg_parameter_status($this->db_connect_id, 'server_version'); - } - else - { - $query_id = @pg_query($this->db_connect_id, 'SELECT VERSION()'); - $row = @pg_fetch_assoc($query_id, null); - @pg_free_result($query_id); - - if (!empty($row['version'])) - { - $this->pgsql_version = substr($row['version'], 10); - } - } + $this->pgsql_version = @pg_parameter_status($this->db_connect_id, 'server_version'); if (!empty($this->pgsql_version) && $this->pgsql_version[0] >= '8' && $this->pgsql_version[2] >= '2') { @@ -172,7 +158,7 @@ class dbal_postgres extends dbal if ($this->query_result === false) { - if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false) + if (($this->query_result = pg_query($this->db_connect_id, $query)) === false) { $this->sql_error($query); } |