From 96fc6f5e471807dced9bfb570fd25388626ccbd6 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 9 Mar 2006 10:52:56 +0000 Subject: [PATCH] initially Support adding new privileges --- include/functions_config.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { -- 2.39.5