fix bug reported by Kristoffer `spq` Janke about bad formated DELETE FROM when dropin...
authorioguix <ioguix>
Wed, 20 Feb 2008 20:43:09 +0000 (20:43 +0000)
committerioguix <ioguix>
Wed, 20 Feb 2008 20:43:09 +0000 (20:43 +0000)
classes/database/ADODB_base.php
classes/database/Postgres.php

index 642b453db84c15aa3f43f120d8f9d331e3a925f7..816d6930219e7e06358f80f31ac43a3105b3439a 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * Parent class of all ADODB objects.
  *
- * $Id: ADODB_base.php,v 1.23 2007/12/12 04:11:10 xzilla Exp $
+ * $Id: ADODB_base.php,v 1.24 2008/02/20 20:43:10 ioguix Exp $
  */
 
 include_once('./libraries/errorhandler.inc.php');
@@ -134,8 +134,10 @@ class ADODB_base {
 
                reset($conditions);
 
-               if (!empty($schema))
+               if (!empty($schema)) {
+                       $this->fieldClean($schema);
                        $schema = "\"{$schema}\".";
+               }
 
                // Build clause
                $sql = '';
index c60c76337c8a9181a65e7610a43603dbf1fc1c8c..00d18be878774e099f8299569762306f54f3ab0a 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres.php,v 1.319 2008/01/19 13:46:15 ioguix Exp $
+ * $Id: Postgres.php,v 1.320 2008/02/20 20:43:09 ioguix Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1656,7 +1656,7 @@ class Postgres extends ADODB_base {
                                return -1;
                        }
 
-                       $status = $this->delete($table, $key, $this->schema());
+                       $status = $this->delete($table, $key, $this->_schema);
                        if ($status != 0 || $this->conn->Affected_Rows() != 1) {
                                $this->rollbackTransaction();
                                return -2;