]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - extlib/DB/oci8.php
Merge branch 'doc-backup-restore-def-vals' into 'nightly'
[quix0rs-gnu-social.git] / extlib / DB / oci8.php
index 6ad36643a69c0c4e93bccb3225ef6ef9341f2d8d..1ca7a04e225b5b62fd456747b58a613997c3dec8 100644 (file)
@@ -6,7 +6,7 @@
  * The PEAR DB driver for PHP's oci8 extension
  * for interacting with Oracle databases
  *
- * PHP versions 4 and 5
+ * PHP version 5
  *
  * LICENSE: This source file is subject to version 3.0 of the PHP license
  * that is available through the world-wide-web at the following URI:
@@ -20,7 +20,7 @@
  * @author     Daniel Convissor <danielc@php.net>
  * @copyright  1997-2007 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: oci8.php,v 1.116 2007/11/28 02:22:39 aharvey Exp $
+ * @version    CVS: $Id$
  * @link       http://pear.php.net/package/DB
  */
 
@@ -47,7 +47,7 @@ require_once 'DB/common.php';
  * @author     Daniel Convissor <danielc@php.net>
  * @copyright  1997-2007 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.7.14RC1
+ * @version    Release: 1.9.2
  * @link       http://pear.php.net/package/DB
  */
 class DB_oci8 extends DB_common
@@ -173,13 +173,13 @@ class DB_oci8 extends DB_common
     // {{{ constructor
 
     /**
-     * This constructor calls <kbd>$this->DB_common()</kbd>
+     * This constructor calls <kbd>parent::__construct()</kbd>
      *
      * @return void
      */
-    function DB_oci8()
+    function __construct()
     {
-        $this->DB_common();
+        parent::__construct();
     }
 
     // }}}
@@ -251,7 +251,7 @@ class DB_oci8 extends DB_common
                                                    $char);
             $error = OCIError();
             if (!empty($error) && $error['code'] == 12541) {
-                // Could not find TNS listener.  Try direct connection.
+                // Couldn't find TNS listener.  Try direct connection.
                 $this->connection = @$connect_function($dsn['username'],
                                                        $dsn['password'],
                                                        null,
@@ -368,7 +368,7 @@ class DB_oci8 extends DB_common
      * See DB_result::fetchInto() for more information.
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::fetchInto() instead.  It cannot be declared "protected"
+     * DB_result::fetchInto() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result    the query result resource
@@ -415,7 +415,7 @@ class DB_oci8 extends DB_common
      * Deletes the result set and frees the memory occupied by the result set
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::free() instead.  It cannot be declared "protected"
+     * DB_result::free() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -452,6 +452,7 @@ class DB_oci8 extends DB_common
         if (isset($this->prepare_types[(int)$stmt])) {
             unset($this->prepare_types[(int)$stmt]);
             unset($this->manip_query[(int)$stmt]);
+            unset($this->_prepared_queries[(int)$stmt]);
         } else {
             return false;
         }
@@ -468,7 +469,7 @@ class DB_oci8 extends DB_common
      * is turned on.
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::numRows() instead.  It cannot be declared "protected"
+     * DB_result::numRows() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -511,7 +512,7 @@ class DB_oci8 extends DB_common
      * Gets the number of columns in a result set
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::numCols() instead.  It cannot be declared "protected"
+     * DB_result::numCols() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -670,7 +671,8 @@ class DB_oci8 extends DB_common
                 $tmp = $this->oci8RaiseError($stmt);
                 return $tmp;
             }
-            $this->last_query = preg_replace("/:bind$i/",$this->quoteSmart($data[$key]),$this->last_query,1);
+            $this->last_query = preg_replace("/:bind$i(?!\d)/",
+                    $this->quoteSmart($data[$key]), $this->last_query, 1);
             $i++;
         }
         if ($this->autocommit) {