]> git.mjollnir.org Git - s9y.git/commitdiff
Fix setting values to "false" (bool) and not the string which evaluates as true
authorgarvinhicking <garvinhicking>
Tue, 14 Jun 2005 12:54:32 +0000 (12:54 +0000)
committergarvinhicking <garvinhicking>
Tue, 14 Jun 2005 12:54:32 +0000 (12:54 +0000)
include/functions_config.inc.php

index 3633b0f01fa962be056f3ae3a502423b4959582f..f7d48f785aed5cd611068df78f9fd4d23fec3d54 100644 (file)
@@ -50,7 +50,11 @@ function serendipity_set_config_var($name, $val, $authorid = 0) {
     $r = serendipity_db_insert('config', array('name' => $name, 'value' => $val, 'authorid' => $authorid));
     
     if ($authorid === 0 || $authorid === $serendipity['authorid']) {
-        $serendipity[$name] = $val;
+        if ($val === 'false') {
+            $serendipity[$name] = false;
+        } else {
+            $serendipity[$name] = $val;
+        }
     }
 
     if (is_string($r)) {
@@ -638,6 +642,7 @@ function serendipity_checkPermission($permName, $authorid = null, $returnMyGroup
     }
 
     $return = true;
+
     foreach($group[$authorid] AS $item) {
         if (!isset($item[$permName])) {
             continue;