mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/16363] Allow replying to locked topics if user has m_lock permissions
An user may not be able to edit - but lock and unlock. It is terribly inconvenient for users being only able to un/lock threads to have to first unlock a topic, then reply and then re-lock it. Thus in reply mode we check for lock permissions instead of edit. This also includes editing if the user could normally edit his post if it weren't for the lock. PHPBB3-16363
This commit is contained in:
@@ -434,7 +434,7 @@ if ($post_data['forum_type'] != FORUM_POST && in_array($mode, array('post', 'bum
|
||||
}
|
||||
|
||||
// Forum/Topic locked?
|
||||
if (($post_data['forum_status'] == ITEM_LOCKED || (isset($post_data['topic_status']) && $post_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id))
|
||||
if (($post_data['forum_status'] == ITEM_LOCKED || (isset($post_data['topic_status']) && $post_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get($mode == 'reply' ? 'm_lock' : 'm_edit', $forum_id))
|
||||
{
|
||||
trigger_error(($post_data['forum_status'] == ITEM_LOCKED) ? 'FORUM_LOCKED' : 'TOPIC_LOCKED');
|
||||
}
|
||||
|
@@ -1931,7 +1931,7 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
|
||||
|
||||
$s_cannot_edit = !$auth->acl_get('f_edit', $forum_id) || $user->data['user_id'] != $poster_id;
|
||||
$s_cannot_edit_time = $config['edit_time'] && $row['post_time'] <= time() - ($config['edit_time'] * 60);
|
||||
$s_cannot_edit_locked = $topic_data['topic_status'] == ITEM_LOCKED || $row['post_edit_locked'];
|
||||
$s_cannot_edit_locked = ($topic_data['topic_status'] == ITEM_LOCKED && !$auth->acl_get('m_lock', $forum_id)) || $row['post_edit_locked'];
|
||||
|
||||
$s_cannot_delete = $user->data['user_id'] != $poster_id || (
|
||||
!$auth->acl_get('f_delete', $forum_id) &&
|
||||
|
Reference in New Issue
Block a user