Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 17
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12* Idea and original RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21
13* Original MOD: http://www.phpbb.com/community/viewtopic.php?f=69&t=1214645
14* MOD Author Profile: http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=345763
15* MOD Author Homepage: http://www.mssti.com/phpbb3/
16*
17**/
18
19use Symfony\Component\HttpFoundation\RedirectResponse;
20use Symfony\Component\Routing\Exception\InvalidParameterException;
21
22/**
23* @ignore
24**/
25define('IN_PHPBB', true);
26$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
27$phpEx = substr(strrchr(__FILE__, '.'), 1);
28include($phpbb_root_path . 'common.' . $phpEx);
29
30/** @var \phpbb\controller\helper $controller_helper */
31$controller_helper = $phpbb_container->get('controller.helper');
32
33$forum_id    = $request->variable('f', 0);
34$topic_id    = $request->variable('t', 0);
35$mode    = $request->variable('mode', '');
36
37if ($forum_id !== 0)
38{
39    $url = $controller_helper->route('phpbb_feed_forum', array('forum_id' => $forum_id), false);
40}
41else if ($topic_id !== 0)
42{
43    $url = $controller_helper->route('phpbb_feed_topic', array('topic_id' => $topic_id), false);
44}
45else
46{
47    try
48    {
49        $url = $controller_helper->route('phpbb_feed_overall', array('mode' => $mode), false);
50    }
51    catch (InvalidParameterException $e)
52    {
53        $url = $controller_helper->route('phpbb_feed_index');
54    }
55}
56
57$response = new RedirectResponse($url, 301);
58$response->send();