]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated documentation for set_config(). Removed unnecessary escaping of value before...
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Mar 2010 16:48:05 +0000 (16:48 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Mar 2010 16:48:05 +0000 (16:48 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5428 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/configuration.php

index 17b3cd04a182e7ab959c11201f5ca34b466a7768..100b5ac3775797c657eff80d7a2f15b34bf784df 100644 (file)
@@ -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;