From a089ff5eb0dcdab83c6c2e64cb0e7cb618aec41f Mon Sep 17 00:00:00 2001 From: MateBartus <mate.bartus@gmail.com> Date: Wed, 25 Feb 2015 21:13:20 +0100 Subject: [ticket/13654] Moving reporting into controller Moving report.php's content into different services and controllers to better comply with the MVC model. Also implementing: * Replacement for reasons_display() * Adding assign_meta_refresh_var() to \controller\helper * Adding separate routes for easy configuration * Updating unit tests to expect to correct results * Add BC tests PHPBB3-13654 --- phpBB/phpbb/controller/helper.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'phpBB/phpbb/controller/helper.php') diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 340b29306a..74e6cb7034 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -223,6 +223,20 @@ class helper return $this->render('message_body.html', $this->user->lang($title), $code); } + /** + * Assigns automatic refresh time meta tag in template + * + * @param int $time time in seconds, when redirection should occur + * @param string $url the URL where the user should be redirected + * @return null + */ + public function assign_meta_refresh_var($time, $url) + { + $this->template->assign_vars(array( + 'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />', + )); + } + /** * Return the current url * -- cgit v1.2.1