cvs: pear /Auth_PrefManager PrefManager.php
| From: | Jon Wood | Date: | Fri, 30 Apr 2004 17:37:33 +0000 |
| Subject: | cvs: pear /Auth_PrefManager PrefManager.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-19037@lists.php.net to get a copy of this message | ||
jellybob Fri Apr 30 13:37:33 2004 EDT
Modified files:
/pear/Auth_PrefManager PrefManager.php
Log:
User quoteIdentifier to ensure legal column and table names.
http://cvs.php.net/diff.php/pear/Auth_PrefManager/PrefManager.php?r1=1.12&r2=1.13&ty=u
Index: pear/Auth_PrefManager/PrefManager.php
diff -u pear/Auth_PrefManager/PrefManager.php:1.12 pear/Auth_PrefManager/PrefManager.php:1.13
--- pear/Auth_PrefManager/PrefManager.php:1.12 Fri Apr 30 13:10:47 2004
+++ pear/Auth_PrefManager/PrefManager.php Fri Apr 30 13:37:32 2004
@@ -15,7 +15,7 @@
* @author Jon Wood <jon@jellybob.co.uk>
* @package Auth_PrefManager
* @category Authentication
- */
+ */
class Auth_PrefManager
{
/**
@@ -135,13 +135,13 @@
}
if (is_array($properties)) {
- if (isset($properties["table"])) { $this->_table =
$properties["table"]; }
- if (isset($properties["userColumn"])) { $this->_userColumn =
$properties["userColumn"]; }
- if (isset($properties["nameColumn"])) { $this->_nameColumn =
$properties["nameColumn"]; }
- if (isset($properties["valueColumn"])) { $this->_valueColumn =
$properties["valueColumn"]; }
+ 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["defaultUser"])) { $this->_defaultUser =
$properties["defaultUser"]; }
if (isset($properties["cacheName"])) { $this->_cacheName =
$properties["cacheName"]; }
- if (isset($properties["useCache"])) { $this->_useCache =
$properties["useCache"]; }
+ if (isset($properties["useCache"])) { $this->_useCache =
$properties["useCache"]; }
if (isset($properties["serialize"])) { $this->_serialize =
$properties["serialize"]; }
}
@@ -199,6 +199,7 @@
$this->_nameColumn,
$this->_db->quote($pref_id));
$result = $this->_db->query($query);
+ echo $query;
if (DB::isError($result)) {
// Ouch! The query failed!
$this->_lastError = "DB Error: ".$result->getMessage();