From e48b850ab5dfed646e91d87f0dd9c560e7fd76cf Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 29 Oct 2010 13:29:00 +0200 Subject: [feature/system-cron] use phpbb_request instead of plain superglobals PHPBB3-9596 --- phpBB/includes/cron/task/core/prune_forum.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/cron/task/core') diff --git a/phpBB/includes/cron/task/core/prune_forum.php b/phpBB/includes/cron/task/core/prune_forum.php index 440dc5e358..b3f63c9f6c 100644 --- a/phpBB/includes/cron/task/core/prune_forum.php +++ b/phpBB/includes/cron/task/core/prune_forum.php @@ -103,20 +103,19 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p } /** - * Parses parameters found in $params, which is an array. + * Parses parameters found in $request, which is an instance of + * phpbb_request_interface. * - * $params may contain user input and is not trusted. - * - * $params is expected to have a key f whose value is id of the forum to be pruned. + * It is expected to have a key f whose value is id of the forum to be pruned. */ - public function parse_parameters($params) + public function parse_parameters(phpbb_request_interface $request) { global $db; $this->forum_data = null; - if (isset($params['f'])) + if ($request->is_set('f')) { - $forum_id = (int) $params['f']; + $forum_id = $request->variable('f', 0); $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq FROM ' . FORUMS_TABLE . " -- cgit v1.2.1