aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2010-05-27 15:17:03 +0200
committerJoas Schilling <nickvergessen@gmx.de>2010-05-27 15:17:03 +0200
commit4746a60d221d2e32c98eff1f44d996bf7296e737 (patch)
treefaebf5725f30e90365952661c2306c7d7beb4c2a /phpBB/includes/acp/acp_forums.php
parent6d7e30ae995fe0791c2bced0974b0445fa769ee9 (diff)
downloadforums-4746a60d221d2e32c98eff1f44d996bf7296e737.tar
forums-4746a60d221d2e32c98eff1f44d996bf7296e737.tar.gz
forums-4746a60d221d2e32c98eff1f44d996bf7296e737.tar.bz2
forums-4746a60d221d2e32c98eff1f44d996bf7296e737.tar.xz
forums-4746a60d221d2e32c98eff1f44d996bf7296e737.zip
[ticket/9094] Hide "Copy permissions" message, when permissions were copied.
When creating a forum, you afterwards read "Forum created successfully. Now you are able to set permissions for this forum.", also when you already copied the permissions from another forum. PHPBB3-9094
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 541a514bef..6261f866bb 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -190,12 +190,14 @@ class acp_forums
$forum_perm_from = request_var('forum_perm_from', 0);
$cache->destroy('sql', FORUMS_TABLE);
+ $copied_permissions = false;
// Copy permissions?
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
cache_moderators();
+ $copied_permissions = true;
}
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
@@ -211,13 +213,13 @@ class acp_forums
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
// Redirect to permissions
- if ($auth->acl_get('a_fauth'))
+ if ($auth->acl_get('a_fauth') && !$copied_permissions)
{
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
}
// redirect directly to permission settings screen if authed
- if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
+ if ($action == 'add' && !$copied_permissions && $auth->acl_get('a_fauth'))
{
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
}