mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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
This commit is contained in:
parent
6d7e30ae99
commit
4746a60d22
1 changed files with 4 additions and 2 deletions
|
@ -190,12 +190,14 @@ class acp_forums
|
||||||
$forum_perm_from = request_var('forum_perm_from', 0);
|
$forum_perm_from = request_var('forum_perm_from', 0);
|
||||||
$cache->destroy('sql', FORUMS_TABLE);
|
$cache->destroy('sql', FORUMS_TABLE);
|
||||||
|
|
||||||
|
$copied_permissions = false;
|
||||||
// Copy permissions?
|
// Copy permissions?
|
||||||
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
|
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'))))
|
($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);
|
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
|
||||||
cache_moderators();
|
cache_moderators();
|
||||||
|
$copied_permissions = true;
|
||||||
}
|
}
|
||||||
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
|
/* 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'))
|
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'];
|
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
|
||||||
|
|
||||||
// Redirect to permissions
|
// 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>');
|
$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
|
// 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));
|
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue