From e773c0d23ed0a61fbfa024d1426f03e8a553ee0d Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Thu, 5 Nov 2009 18:49:12 +0000 Subject: [PATCH] removed x-codeBlob functions and modified blob handling acordingly --- includes/db/DatabaseOracle.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 55c9c05089..6bf3e3fe06 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -276,9 +276,9 @@ class DatabaseOracle extends DatabaseBase { function doQuery($sql) { wfDebug("SQL: [$sql]\n"); - if (!mb_check_encoding($sql)) { - throw new MWException("SQL encoding is invalid"); - } +// if (!mb_check_encoding($sql)) { +// throw new MWException("SQL encoding is invalid\n$sql"); +// } //handle some oracle specifics //remove AS column/table/subquery namings @@ -478,8 +478,8 @@ class DatabaseOracle extends DatabaseBase { throw new DBUnexpectedError($this, "Cannot create LOB descriptor: " . $e['message']); } - if (is_object($val)) { - $lob[$col]->writeTemporary($val->getData()); + if ($col_type == 'BLOB') { //is_object($val)) { + $lob[$col]->writeTemporary($val); //->getData()); oci_bind_by_name($stmt, ":$col", $lob[$col], -1, SQLT_BLOB); } else { $lob[$col]->writeTemporary($val); @@ -952,13 +952,14 @@ class DatabaseOracle extends DatabaseBase { return str_replace("'", "''", $s); } +/* function encodeBlob($b) { - return new ORABlob($b); + return $b; //new ORABlob($b); } function decodeBlob($b) { return $b; //return $b->load(); } - +*/ function addQuotes( $s ) { global $wgLang; if (isset($wgLang->mLoaded) && $wgLang->mLoaded) -- 2.20.1