cvs: pear /Auth_PrefManager PrefManager.php
| From: | Jon Wood | Date: | Mon, 04 Apr 2005 23:58:13 +0000 |
| Subject: | cvs: pear /Auth_PrefManager PrefManager.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30926@lists.php.net to get a copy of this message | ||
jellybob Mon Apr 4 19:58:13 2005 EDT
Modified files:
/pear/Auth_PrefManager PrefManager.php
Log:
Added patch provided by aashley@optimiser.com in bug #2512
http://cvs.php.net/diff.php/pear/Auth_PrefManager/PrefManager.php?r1=1.14&r2=1.15&ty=u
Index: pear/Auth_PrefManager/PrefManager.php
diff -u pear/Auth_PrefManager/PrefManager.php:1.14 pear/Auth_PrefManager/PrefManager.php:1.15
--- pear/Auth_PrefManager/PrefManager.php:1.14 Wed Jun 16 19:36:23 2004
+++ pear/Auth_PrefManager/PrefManager.php Mon Apr 4 19:58:13 2005
@@ -70,6 +70,13 @@
*/
var $_valueColumn = "pref_value";
+ /**
+ * The quoted value column.
+ * @var string
+ * @access private
+ */
+ var $_valueColumnQuoted = "pref_value";
+
/**
* The session variable that the cache array is stored in.
* @var string
@@ -138,7 +145,8 @@
if (isset($properties["table"])) { $this->_table =
$this->_db->quoteIdentifier($properties["table"]); }
if (isset($properties["userColumn"])) { $this->_userColumn =
$this->_db->quoteIdentifier($properties["userColumn"]); }
if (isset($properties["nameColumn"])) { $this->_nameColumn =
$this->_db->quoteIdentifier($properties["nameColumn"]); }
- if (isset($properties["valueColumn"])) { $this->_valueColumn =
$this->_db->quoteIdentifier($properties["valueColumn"]); }
+ if (isset($properties["valueColumn"])) { $this->_valueColumn =
$properties["valueColumn"]; }
+ if (isset($properties["valueColumn"])) { $this->_valueColumnQuoted =
$this->_db->quoteIdentifier($properties["valueColumn"]); }
if (isset($properties["defaultUser"])) { $this->_defaultUser =
$properties["defaultUser"]; }
if (isset($properties["cacheName"])) { $this->_cacheName =
$properties["cacheName"]; }
if (isset($properties["useCache"])) { $this->_useCache =
$properties["useCache"]; }
@@ -271,7 +279,7 @@
// an UPDATE, if not, it's an INSERT.
if ($this->_exists($user_id, $pref_id, false)) {
$query = sprintf("UPDATE %s SET %s=%s WHERE %s=%s AND %s=%s",
$this->_table,
- $this->_valueColumn,
+
$this->_valueColumnQuoted,
$this->_db->quote($this->_pack($value)),
$this->_userColumn,
$this->_db->quote($user_id),
@@ -281,7 +289,7 @@
$query = sprintf("INSERT INTO %s (%s, %s, %s) VALUES(%s, %s, %s)",
$this->_table,
$this->_userColumn,
$this->_nameColumn,
-
$this->_valueColumn,
+
$this->_valueColumnQuoted,
$this->_db->quote($user_id),
$this->_db->quote($pref_id),
$this->_db->quote($this->_pack($value)));