diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-19 20:34:22 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-19 20:34:22 +0100 |
commit | bdab6dede016854d65f31ae869924ac9f7e98ce9 (patch) | |
tree | c5d336b72704146803f96ab21be7a2e3d6c0592f | |
parent | c1b48bdd0116d5aa39545c5c3d2797e34ebc1948 (diff) | |
parent | d71fd5d66091b0ea557ece2e53a02094415362d6 (diff) | |
download | forums-bdab6dede016854d65f31ae869924ac9f7e98ce9.tar forums-bdab6dede016854d65f31ae869924ac9f7e98ce9.tar.gz forums-bdab6dede016854d65f31ae869924ac9f7e98ce9.tar.bz2 forums-bdab6dede016854d65f31ae869924ac9f7e98ce9.tar.xz forums-bdab6dede016854d65f31ae869924ac9f7e98ce9.zip |
Merge remote-tracking branch 'Elsensee/ticket/11766' into develop-olympus
* Elsensee/ticket/11766:
[ticket/11766] Hide edit, quote and delete buttons if topic is locked
-rw-r--r-- | phpBB/viewtopic.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fb12dd925a..e08d6e1ef5 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1509,13 +1509,19 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $edit_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_edit', $forum_id) || ( $user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && + $topic_data['topic_status'] != ITEM_LOCKED && !$row['post_edit_locked'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time']) ))); + $quote_allowed = $auth->acl_get('m_edit', $forum_id) || ($topic_data['topic_status'] != ITEM_LOCKED && + ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('f_reply', $forum_id)) + ); + $delete_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_delete', $forum_id) || ( $user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && + $topic_data['topic_status'] != ITEM_LOCKED && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time']) && // we do not want to allow removal of the last post if a moderator locked it! @@ -1556,7 +1562,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false), 'U_EDIT' => ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '', - 'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '', + 'U_QUOTE' => ($quote_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '', 'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '', 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '', |