* @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')) {
$value = 'false';
}
- if (!serendipity_checkPermission($perm)) {
+ if ($isNewPriv == false && !serendipity_checkPermission($perm)) {
if (!isset($storage[$perm])) {
$value = 'false';
} else {