diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-19 20:37:52 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-19 20:37:52 +0100 |
commit | 76d7d38dea10d6355e680c448579369ca8bd48d2 (patch) | |
tree | 1afd18ca861e7073bb76acc15aae38117726fa16 | |
parent | 1af769714304054e63ffaeb41cfa51801785a59d (diff) | |
parent | bdab6dede016854d65f31ae869924ac9f7e98ce9 (diff) | |
download | forums-76d7d38dea10d6355e680c448579369ca8bd48d2.tar forums-76d7d38dea10d6355e680c448579369ca8bd48d2.tar.gz forums-76d7d38dea10d6355e680c448579369ca8bd48d2.tar.bz2 forums-76d7d38dea10d6355e680c448579369ca8bd48d2.tar.xz forums-76d7d38dea10d6355e680c448579369ca8bd48d2.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/11766] Hide edit, quote and delete buttons if topic is locked
Conflicts:
phpBB/viewtopic.php
-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 596272636a..61a28940b1 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1564,13 +1564,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) || ($auth->acl_get('m_softdelete', $forum_id) && $row['post_visibility'] != ITEM_DELETED)) || ( $user->data['user_id'] == $poster_id && ($auth->acl_get('f_delete', $forum_id) || ($auth->acl_get('f_softdelete', $forum_id) && $row['post_visibility'] != ITEM_DELETED)) && + $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! @@ -1611,7 +1617,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']}") : '', |