aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-17 16:48:05 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-17 16:48:05 +0000
commit9382a9766189d0fce525b2ba91a33801c4522797 (patch)
tree420eb99e781dc6fec4a1fd2dbe2bc9b2c186c805 /engine
parent87a78d3b8e0e13677ceb3b5b7f5378864f907b7c (diff)
downloadelgg-9382a9766189d0fce525b2ba91a33801c4522797.tar.gz
elgg-9382a9766189d0fce525b2ba91a33801c4522797.tar.bz2
Updated documentation for set_config(). Removed unnecessary escaping of value before serializing, which broke arrays anyway...
git-svn-id: http://code.elgg.org/elgg/trunk@5428 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/configuration.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index 17b3cd04a..100b5ac37 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -34,16 +34,15 @@ function unset_config($name, $site_guid = 0) {
* @param string $name The name of the configuration value
* @param string $value Its value
* @param int $site_guid Optionally, the GUID of the site (current site is assumed by default)
- * @return false|int 1 or false depending on success or failure
+ * @return 0
+ * @todo The config table doens't have numeric primary keys so insert_data returns 0.
*/
function set_config($name, $value, $site_guid = 0) {
global $CONFIG;
// Unset existing
- unset_config($name,$site_guid);
+ unset_config($name, $site_guid);
- $name = mysql_real_escape_string($name);
- $value = mysql_real_escape_string($value);
$site_guid = (int) $site_guid;
if ($site_guid == 0) {
$site_guid = (int) $CONFIG->site_id;