From: garvinhicking Date: Thu, 9 Mar 2006 10:52:56 +0000 (+0000) Subject: initially Support adding new privileges X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=96fc6f5e471807dced9bfb570fd25388626ccbd6;p=s9y.git initially Support adding new privileges --- diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 9e25b99..6ba8bf0 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -1234,9 +1234,10 @@ function serendipity_intersectGroup($checkuser = null, $myself = null) { * @param int The ID of the group to update * @param array The associative array of permission names * @param array The associative array of new values for the permissions. Needs the same associative keys like the $perms array. + * @param bool Indicates if an all new privilege should be inserted (true) or if an existing privilege is going to be checked * @return true */ -function serendipity_updateGroupConfig($groupid, &$perms, &$values) { +function serendipity_updateGroupConfig($groupid, &$perms, &$values, $isNewPriv = false) { global $serendipity; if (!serendipity_checkPermission('adminUsersGroups')) { @@ -1265,7 +1266,7 @@ function serendipity_updateGroupConfig($groupid, &$perms, &$values) { $value = 'false'; } - if (!serendipity_checkPermission($perm)) { + if ($isNewPriv == false && !serendipity_checkPermission($perm)) { if (!isset($storage[$perm])) { $value = 'false'; } else {