diff options
Diffstat (limited to 'phpBB/includes/ucp/ucp_notifications.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_notifications.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index 145963837c..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'); @@ -78,9 +79,9 @@ class ucp_notifications trigger_error($message); } - $this->output_notification_methods('notification_methods', $phpbb_notifications, $template, $user); + $this->output_notification_methods($phpbb_notifications, $template, $user, 'notification_methods'); - $this->output_notification_types($subscriptions, 'notification_types', $phpbb_notifications, $template, $user); + $this->output_notification_types($subscriptions, $phpbb_notifications, $template, $user, 'notification_types'); $this->tpl_name = 'ucp_notifications'; $this->page_title = 'UCP_NOTIFICATION_OPTIONS'; @@ -162,12 +163,13 @@ class ucp_notifications /** * Output all the notification types to the template * - * @param string $block + * @param array $subscriptions Array containing global subscriptions * @param \phpbb\notification\manager $phpbb_notifications * @param \phpbb\template\template $template * @param \phpbb\user $user + * @param string $block */ - public function output_notification_types($subscriptions, $block = 'notification_types', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user) + public function output_notification_types($subscriptions, \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_types') { $notification_methods = $phpbb_notifications->get_subscription_methods(); @@ -209,12 +211,12 @@ class ucp_notifications /** * Output all the notification methods to the template * - * @param string $block * @param \phpbb\notification\manager $phpbb_notifications * @param \phpbb\template\template $template * @param \phpbb\user $user + * @param string $block */ - public function output_notification_methods($block = 'notification_methods', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user) + public function output_notification_methods(\phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_methods') { $notification_methods = $phpbb_notifications->get_subscription_methods(); |