This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 491adedf0aefcbc70c4250f9db0dde6d07cc8772 (commit)
from c2c198d04eb089c31550a6a4b711fb95d6c25851 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 491adedf0aefcbc70c4250f9db0dde6d07cc8772
Author: Ivan1986 <iva...@li...>
Date: Thu Jul 1 11:18:42 2010 +0400
When you assign $this->DbSimple_Postgresql_USE_NATIVE_PHOLDERS = false manually for PostgreSQL, apostrophs were quoted incorrectly.
diff --git a/lib/DbSimple/Postgresql.php b/lib/DbSimple/Postgresql.php
index 5b2ed1f..785e8a5 100644
--- a/lib/DbSimple/Postgresql.php
+++ b/lib/DbSimple/Postgresql.php
@@ -58,7 +58,7 @@ class DbSimple_Postgresql extends DbSimple_Generic_Database
function _performEscape($s, $isIdent=false)
{
if (!$isIdent)
- return "'" . str_replace("'", "''", $s) . "'";
+ return "E'" . pg_escape_string($this->link, $s) . "'";
else
return '"' . str_replace('"', '_', $s) . '"';
}
@@ -216,7 +216,7 @@ class DbSimple_Postgresql extends DbSimple_Generic_Database
function _setDbError($query)
{
- return $this->_setLastError(null, pg_last_error($this->link), $query);
+ return $this->_setLastError(null, $this->link? pg_last_error($this->link) : (is_array($query)? "Connection is not established" : $query), $query);
}
function _getVersion()
-----------------------------------------------------------------------
Summary of changes:
lib/DbSimple/Postgresql.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
quickfw
|