From: garvinhicking Date: Tue, 14 Jun 2005 12:54:32 +0000 (+0000) Subject: Fix setting values to "false" (bool) and not the string which evaluates as true X-Git-Tag: 0.9~397 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f52f39b42d76732ca14d00acaa21f8de12b1f2e1;p=s9y.git Fix setting values to "false" (bool) and not the string which evaluates as true --- diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 3633b0f..f7d48f7 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -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;