aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/posting.php2
-rw-r--r--phpBB/viewtopic.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 6e1bde42f8..441de9f28c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -384,7 +384,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
$force_edit_allowed = false;
$s_cannot_edit = $user->data['user_id'] != $post_data['poster_id'];
- $s_cannot_edit_time = !($post_data['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time']);
+ $s_cannot_edit_time = $config['edit_time'] && $post_data['post_time'] <= time() - ($config['edit_time'] * 60);
$s_cannot_edit_locked = $post_data['post_edit_locked'];
/**
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 56e4479973..95bee9789f 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1585,7 +1585,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$force_edit_allowed = $force_delete_allowed = false;
$s_cannot_edit = !$auth->acl_get('f_edit', $forum_id) || $user->data['user_id'] != $poster_id;
- $s_cannot_edit_time = !($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time']);
+ $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_delete = $user->data['user_id'] != $poster_id || (
@@ -1593,7 +1593,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
(!$auth->acl_get('f_softdelete', $forum_id) || $row['post_visibility'] == ITEM_DELETED)
);
$s_cannot_delete_lastpost = $topic_data['topic_last_post_id'] != $row['post_id'];
- $s_cannot_delete_time = !($row['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time']);
+ $s_cannot_delete_time = $config['delete_time'] && $row['post_time'] <= time() - ($config['delete_time'] * 60);
// we do not want to allow removal of the last post if a moderator locked it!
$s_cannot_delete_locked = $topic_data['topic_status'] == ITEM_LOCKED || $row['post_edit_locked'];