aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-08-06 18:18:02 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-08-06 18:18:02 +0000
commited69b27cb649066d193e941d4415913c8e95f59a (patch)
treec4cd9cb6921b2c9ffb8307365a198549628dd259 /phpBB/includes/db
parent5541765c4adefbd78d78476be104fb54846e6270 (diff)
downloadforums-ed69b27cb649066d193e941d4415913c8e95f59a.tar
forums-ed69b27cb649066d193e941d4415913c8e95f59a.tar.gz
forums-ed69b27cb649066d193e941d4415913c8e95f59a.tar.bz2
forums-ed69b27cb649066d193e941d4415913c8e95f59a.tar.xz
forums-ed69b27cb649066d193e941d4415913c8e95f59a.zip
*** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6244 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/postgres.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index 03fd5c17ce..68dc396232 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -89,9 +89,18 @@ class dbal_postgres extends dbal
*/
function sql_server_info()
{
- $version = @pg_version($this->db_connect_id);
-
- return 'PostgreSQL' . ((!empty($version)) ? ' ' . $version['client'] : '');
+ if (version_compare(phpversion(), '5.0.0', '>='))
+ {
+ $version = @pg_version($this->db_connect_id);
+ return 'PostgreSQL' . ((!empty($version)) ? ' ' . $version['client'] : '');
+ }
+ else
+ {
+ $query_id = @pg_query($this->db_connect_id, 'select version()');
+ $row = @pg_fetch_assoc($query_id, null);
+ $version = $row['version'];
+ return ((!empty($version)) ? ' ' . $version : '');
+ }
}
/**