mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- Handle forum links/redirects within viewforum if no read permission given (to display login box or error message) (Bug #13467)
- Prevent changing postable forum having subforums to link forum without moving subforums out first git-svn-id: file:///svn/phpbb/trunk@7895 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -991,6 +991,13 @@ class acp_forums
|
||||
|
||||
if ($row['forum_type'] == FORUM_POST && $row['forum_type'] != $forum_data_sql['forum_type'])
|
||||
{
|
||||
// Has subforums and want to change into a link?
|
||||
if ($row['right_id'] - $row['left_id'] > 1 && $forum_data_sql['forum_type'] == FORUM_LINK)
|
||||
{
|
||||
$errors[] = $user->lang['FORUM_WITH_SUBFORUMS_NOT_TO_LINK'];
|
||||
return $errors;
|
||||
}
|
||||
|
||||
// we're turning a postable forum into a non-postable forum
|
||||
if ($forum_data_sql['type_action'] == 'move')
|
||||
{
|
||||
|
@@ -1546,10 +1546,9 @@ class acp_users
|
||||
|
||||
delete_attachments('attach', $marked);
|
||||
|
||||
$log = (sizeof($log_attachments) == 1) ? 'ATTACHMENT_DELETED' : 'ATTACHMENTS_DELETED';
|
||||
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
|
||||
|
||||
add_log('admin', $log, implode(', ', $log_attachments));
|
||||
add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $log_attachments));
|
||||
trigger_error($message . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user