From 9332374b5a5d628b260a518d0f267278c7e519c2 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 16 Mar 2006 11:26:16 +0000 Subject: [PATCH] Allow to duplicate groups --- docs/NEWS | 3 +++ include/admin/groups.inc.php | 12 +++++++----- serendipity_admin.php | 6 +++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 304ea21..923e181 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.1-alpha1() ------------------------------------------------------------------------ + * Allow to create new groups from existing ones, by editing them + and clicking on "Create new group". (garvinhicking) + * Statistic plugin update by Shrikee: Graphically display visitors, bot banning. diff --git a/include/admin/groups.inc.php b/include/admin/groups.inc.php index aebf749..30b34df 100644 --- a/include/admin/groups.inc.php +++ b/include/admin/groups.inc.php @@ -20,7 +20,7 @@ if (isset($_POST['DELETE_YES']) && serendipity_checkFormToken()) { /* Save new group */ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) { $serendipity['POST']['group'] = serendipity_addGroup($serendipity['POST']['name']); - $perms = serendipity_getAllPermissionNames(); + $perms = serendipity_getAllPermissionNames(); serendipity_updateGroupConfig($serendipity['POST']['group'], $perms, $serendipity['POST']); printf('
' . CREATED_GROUP . '
', '#' . $serendipity['POST']['group'] . ', ' . $serendipity['POST']['name']); } @@ -28,7 +28,7 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) { /* Edit a group */ if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) { - $perms = serendipity_getAllPermissionNames(); + $perms = serendipity_getAllPermissionNames(); serendipity_updateGroupConfig($serendipity['POST']['group'], $perms, $serendipity['POST']); printf('
' . MODIFIED_GROUP . '
', $serendipity['POST']['name']); } @@ -132,7 +132,7 @@ foreach($allusers AS $user) {   $userlevels) { if (isset($from[$perm]) && $from[$perm] === 'true') { @@ -144,7 +144,7 @@ foreach($allusers AS $user) { if (!isset($section)) { $section = $perm; } - + if ($section != $perm && substr($perm, 0, strlen($section)) == $section) { $indent = '  '; $indentB = ''; @@ -159,7 +159,7 @@ foreach($allusers AS $user) { } else { $permname = $perm; } - + if (!serendipity_checkPermission($perm)) { echo "\n"; echo "$indent" . htmlspecialchars($permname) . "\n"; @@ -178,6 +178,8 @@ foreach($allusers AS $user) { + + diff --git a/serendipity_admin.php b/serendipity_admin.php index 7129735..5d5cd98 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -165,18 +165,22 @@ if (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2d
- -- 2.39.5