aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-09-23 18:04:52 +0000
committerChris Smith <toonarmy@phpbb.com>2008-09-23 18:04:52 +0000
commit9c5a3cca8995b4d1704c3cd57756a8434d4887af (patch)
tree48b119042e74ea5bd8dc63bb9137060fcd505183 /phpBB/posting.php
parente0fe6948d6ccfa1ae848f323fa00e06502b30bca (diff)
downloadforums-9c5a3cca8995b4d1704c3cd57756a8434d4887af.tar
forums-9c5a3cca8995b4d1704c3cd57756a8434d4887af.tar.gz
forums-9c5a3cca8995b4d1704c3cd57756a8434d4887af.tar.bz2
forums-9c5a3cca8995b4d1704c3cd57756a8434d4887af.tar.xz
forums-9c5a3cca8995b4d1704c3cd57756a8434d4887af.zip
Stop users from deleting posts after the edit time has passed or they have been locked. #19115
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8924 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index dbad69cf52..88f31bbe0a 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1302,7 +1302,7 @@ $template->assign_vars(array(
'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false,
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
- 'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
+ 'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
'S_BBCODE_ALLOWED' => $bbcode_status,
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
'S_SMILIES_ALLOWED' => $smilies_status,
@@ -1411,11 +1411,11 @@ function upload_popup($forum_style = 0)
*/
function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
{
- global $user, $db, $auth;
+ global $user, $db, $auth, $config;
global $phpbb_root_path, $phpEx;
// If moderator removing post or user itself removing post, present a confirmation screen
- if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id']))
+ if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])))
{
$s_hidden_fields = build_hidden_fields(array(
'p' => $post_id,