From 77b5d7ee304a688a2eb115ce04b460b43c0dd700 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 22 May 2016 08:43:54 -0400
Subject: [PATCH] Fix priority icon(s) position

---
 program/lib/Roundcube/rcube_db_oracle.php |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/program/lib/Roundcube/rcube_db_oracle.php b/program/lib/Roundcube/rcube_db_oracle.php
index 362beb0..9775f96 100644
--- a/program/lib/Roundcube/rcube_db_oracle.php
+++ b/program/lib/Roundcube/rcube_db_oracle.php
@@ -155,9 +155,14 @@
             }
         }
 
-        // replace escaped '?' back to normal, see self::quote()
-        $query = str_replace('??', '?', $query);
         $query = rtrim($query, " \t\n\r\0\x0B;");
+
+        // replace escaped '?' and quotes back to normal, see self::quote()
+        $query = str_replace(
+            array('??', self::DEFAULT_QUOTE.self::DEFAULT_QUOTE),
+            array('?', self::DEFAULT_QUOTE),
+            $query
+        );
 
         // log query
         $this->debug($query);
@@ -171,7 +176,7 @@
         $mode   = $this->in_transaction ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS;
 
         if ($result) {
-            foreach ($args as $param => $arg) {
+            foreach (array_keys($args) as $param) {
                 oci_bind_by_name($result, $param, $args[$param], -1, SQLT_LNG);
             }
         }
@@ -587,7 +592,7 @@
 
         $this->debug('ROLLBACK TRANSACTION');
 
-        if ($result = @oci_rollback($this->dbh)) {
+        if (@oci_rollback($this->dbh)) {
             $this->in_transaction = false;
         }
         else {

--
Gitblit v1.9.1