aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-11-14 18:16:29 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-11-14 18:16:29 +0100
commit0d3396487e58091053778c9eb40ebcb6fa86536f (patch)
tree9d9e5538986c2c48467bad370c38a2b449dd03c9 /phpBB/includes
parent7f10312bf21dba335a863fb1222db8b9ed64ef0e (diff)
downloadforums-0d3396487e58091053778c9eb40ebcb6fa86536f.tar
forums-0d3396487e58091053778c9eb40ebcb6fa86536f.tar.gz
forums-0d3396487e58091053778c9eb40ebcb6fa86536f.tar.bz2
forums-0d3396487e58091053778c9eb40ebcb6fa86536f.tar.xz
forums-0d3396487e58091053778c9eb40ebcb6fa86536f.zip
[ticket/11896] Use $form_time and fix out of bounds $form_time
PHPBB3-11896
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index de9352a322..63dbe79666 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -27,7 +27,8 @@ class ucp_notifications
add_form_key('ucp_notification');
$start = $request->variable('start', 0);
- $form_time = min($request->variable('form_time', 0), time());
+ $form_time = $request->variable('form_time', 0);
+ $form_time = ($form_time <= 0 || $form_time > time()) ? time() : $form_time;
$phpbb_notifications = $phpbb_container->get('notification_manager');
@@ -103,7 +104,7 @@ class ucp_notifications
{
confirm_box(false, 'NOTIFICATIONS_MARK_ALL_READ', build_hidden_fields(array(
'mark' => 'all',
- 'form_time' => time(),
+ 'form_time' => $form_time,
)));
}
}