]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config.php
Don't show the connect link in the profile on the "follow" page
[friendica.git] / src / Core / Config.php
index 219831ad989acd6f3d9f9a51e0f36fccb6c168db..2515116a9bdef7b01be4bea1eec18b0949047fe5 100644 (file)
@@ -11,15 +11,18 @@ namespace Friendica\Core;
 use Friendica\Database\DBM;
 use dba;
 
+require_once 'include/dba.php';
+
 /**
  * @brief Arbitrary sytem configuration storage
+ *
  * Note:
- * Please do not store booleans - convert to 0/1 integer values
- * The Config::get() functions return boolean false for keys that are unset,
- * and this could lead to subtle bugs.
+ * If we ever would decide to return exactly the variable type as entered,
+ * we will have fun with the additional features. :-)
+ *
+ * The config class always returns strings but in the default features
+ * we use a "false" to determine if the config value isn't set.
  *
- * There are a few places in the code (such as the admin panel) where boolean
- * configurations need to be fixed as of 10/08/2011.
  */
 class Config
 {
@@ -158,7 +161,7 @@ class Config
                // manage array value
                $dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
 
-               dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
+               $ret = dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
 
                if ($ret) {
                        self::$in_db[$family][$key] = true;