summaryrefslogtreecommitdiff
path: root/includes/DatabaseOracle.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/DatabaseOracle.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/DatabaseOracle.php')
-rw-r--r--includes/DatabaseOracle.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/includes/DatabaseOracle.php b/includes/DatabaseOracle.php
index aa1e329e..1a6f62f2 100644
--- a/includes/DatabaseOracle.php
+++ b/includes/DatabaseOracle.php
@@ -55,9 +55,6 @@ class DatabaseOracle extends Database {
$this->mPassword = $password;
$this->mDBname = $dbName;
- $success = false;
-
- $hstring="";
$this->mConn = oci_new_connect($user, $password, $dbName, "AL32UTF8");
if ( $this->mConn === false ) {
wfDebug( "DB connection error\n" );
@@ -147,7 +144,6 @@ class DatabaseOracle extends Database {
for ($i = 1; $i <= $this->mNcols[$res]; $i++) {
$name = $this->mFieldNames[$res][$i];
- $type = $this->mFieldTypes[$res][$i];
if (isset($this->mFetchCache[$res][$this->mFetchID[$res]][$name]))
$value = $this->mFetchCache[$res][$this->mFetchID[$res]][$name];
else $value = NULL;
@@ -165,7 +161,7 @@ class DatabaseOracle extends Database {
return false;
$i = 0;
$ret = array();
- foreach ($r as $key => $value) {
+ foreach ($r as $value) {
wfdebug("ret[$i]=[$value]\n");
$ret[$i++] = $value;
}
@@ -201,14 +197,19 @@ class DatabaseOracle extends Database {
function lastError() {
if ($this->mErr === false) {
- if ($this->mLastResult !== false) $what = $this->mLastResult;
- else if ($this->mConn !== false) $what = $this->mConn;
- else $what = false;
+ if ($this->mLastResult !== false) {
+ $what = $this->mLastResult;
+ } else if ($this->mConn !== false) {
+ $what = $this->mConn;
+ } else {
+ $what = false;
+ }
$err = ($what !== false) ? oci_error($what) : oci_error();
- if ($err === false)
+ if ($err === false) {
$this->mErr = 'no error';
- else
+ } else {
$this->mErr = $err['message'];
+ }
}
return str_replace("\n", '<br />', $this->mErr);
}
@@ -239,6 +240,9 @@ class DatabaseOracle extends Database {
$this->freeResult($res);
$row->Non_unique = !$row->uniqueness;
return $row;
+
+ // BUG: !!!! This code needs to be synced up with database.php
+
}
function indexUnique ($table, $index, $fname = 'indexUnique') {