aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2009-08-31 14:57:04 +0000
committerJoas Schilling <nickvergessen@gmx.de>2009-08-31 14:57:04 +0000
commit139f1d35302fc675b5e972e55c62d36cbc42af5c (patch)
tree9618453f34cafc260fbb26883f9a51d01bc072d2 /phpBB/posting.php
parentd7925595dc46c1d913dd722b2121d4552c20cb47 (diff)
downloadforums-139f1d35302fc675b5e972e55c62d36cbc42af5c.tar
forums-139f1d35302fc675b5e972e55c62d36cbc42af5c.tar.gz
forums-139f1d35302fc675b5e972e55c62d36cbc42af5c.tar.bz2
forums-139f1d35302fc675b5e972e55c62d36cbc42af5c.tar.xz
forums-139f1d35302fc675b5e972e55c62d36cbc42af5c.zip
fix r10076 for #48615 - Ability to specify amount of time user is able to delete his last post in topic.
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10080 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 77a499db4b..b241da2eab 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1433,7 +1433,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) && !$post_data['post_edit_locked']) || $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['delete_time'] * 60) || !$config['delete_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,
@@ -1545,7 +1545,7 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
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'] && !$post_data['post_edit_locked']))
+ 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['delete_time'] * 60) || !$config['delete_time'])))
{
$s_hidden_fields = build_hidden_fields(array(
'p' => $post_id,