aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-11 22:49:10 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-11 22:52:09 +0200
commit8d20f095aaa9e00f10a67022f0f0e84bf0a2b802 (patch)
tree8e9a32cbf4d91c91866095a50306f6dba47ac061 /phpBB/viewtopic.php
parent92e25398c72fe5b1766a6ad4e411aacc72bd177c (diff)
downloadforums-8d20f095aaa9e00f10a67022f0f0e84bf0a2b802.tar
forums-8d20f095aaa9e00f10a67022f0f0e84bf0a2b802.tar.gz
forums-8d20f095aaa9e00f10a67022f0f0e84bf0a2b802.tar.bz2
forums-8d20f095aaa9e00f10a67022f0f0e84bf0a2b802.tar.xz
forums-8d20f095aaa9e00f10a67022f0f0e84bf0a2b802.zip
[ticket/12518] Apply De Morgan to make the conditions easier to read
PHPBB3-12518
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 2 insertions, 2 deletions
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'];