aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/oracle.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-04 12:01:47 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-04 12:01:47 +0000
commit2fcd96ca72741bdfb36c24a0af9dd8230b5a828f (patch)
treeaf6068957c73f64d5885311396c1d7730aa30b3c /phpBB/includes/db/oracle.php
parent4a225280a0fe1b7c364a007eb43dc93975c544e9 (diff)
downloadforums-2fcd96ca72741bdfb36c24a0af9dd8230b5a828f.tar
forums-2fcd96ca72741bdfb36c24a0af9dd8230b5a828f.tar.gz
forums-2fcd96ca72741bdfb36c24a0af9dd8230b5a828f.tar.bz2
forums-2fcd96ca72741bdfb36c24a0af9dd8230b5a828f.tar.xz
forums-2fcd96ca72741bdfb36c24a0af9dd8230b5a828f.zip
Ok, story real database server info, as well as caching it
Store it on installation too - allows us to check the db version used on installation and used currently to warn the user about incompatibilities git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8814 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/oracle.php')
-rw-r--r--phpBB/includes/db/oracle.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 582b267ac3..0daddf76cb 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -55,10 +55,31 @@ class dbal_oracle extends dbal
/**
* Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
+ * @return string sql server version
*/
- function sql_server_info()
+ function sql_server_info($raw = false)
{
- return @ociserverversion($this->db_connect_id);
+/*
+ global $cache;
+
+ if (empty($cache) || ($this->sql_server_version = $cache->get('oracle_version')) === false)
+ {
+ $result = @ociparse($this->db_connect_id, 'SELECT * FROM v$version WHERE banner LIKE \'Oracle%\'');
+ @ociexecute($result, OCI_DEFAULT);
+ @ocicommit($this->db_connect_id);
+
+ $row = array();
+ @ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS);
+ @ocifreestatement($result);
+ $this->sql_server_version = trim($row['BANNER']);
+
+ $cache->put('oracle_version', $this->sql_server_version);
+ }
+*/
+ $this->sql_server_version = @ociserverversion($this->db_connect_id);
+
+ return $this->sql_server_version;
}
/**