mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 17:01:07 +02:00
.github
build
git-tools
phpBB
adm
assets
bin
cache
config
develop
docs
download
ext
files
images
includes
install
language
phpbb
store
styles
vendor-ext
.htaccess
app.php
common.php
composer-ext.json
composer-ext.lock
composer.json
composer.lock
cron.php
faq.php
feed.php
index.php
mcp.php
memberlist.php
posting.php
report.php
search.php
ucp.php
viewforum.php
viewonline.php
viewtopic.php
web.config
tests
travis
vagrant
.editorconfig
.gitignore
.postcss-sorting.json
.stylelintrc
LICENSE
README.md
Vagrantfile
composer.phar
doctum.phar
gulpfile.js
package-lock.json
package.json
phpunit.xml.dist
59 lines
1.6 KiB
PHP
59 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of the phpBB Forum Software package.
|
|
*
|
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
|
*
|
|
* For full copyright and license information, please see
|
|
* the docs/CREDITS.txt file.
|
|
*
|
|
* Idea and original RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21
|
|
* Original MOD: http://www.phpbb.com/community/viewtopic.php?f=69&t=1214645
|
|
* MOD Author Profile: http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=345763
|
|
* MOD Author Homepage: http://www.mssti.com/phpbb3/
|
|
*
|
|
**/
|
|
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
|
use Symfony\Component\Routing\Exception\InvalidParameterException;
|
|
|
|
/**
|
|
* @ignore
|
|
**/
|
|
define('IN_PHPBB', true);
|
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
|
include($phpbb_root_path . 'common.' . $phpEx);
|
|
|
|
/** @var \phpbb\controller\helper $controller_helper */
|
|
$controller_helper = $phpbb_container->get('controller.helper');
|
|
|
|
$forum_id = $request->variable('f', 0);
|
|
$topic_id = $request->variable('t', 0);
|
|
$mode = $request->variable('mode', '');
|
|
|
|
if ($forum_id !== 0)
|
|
{
|
|
$url = $controller_helper->route('phpbb_feed_forum', array('forum_id' => $forum_id), false);
|
|
}
|
|
else if ($topic_id !== 0)
|
|
{
|
|
$url = $controller_helper->route('phpbb_feed_topic', array('topic_id' => $topic_id), false);
|
|
}
|
|
else
|
|
{
|
|
try
|
|
{
|
|
$url = $controller_helper->route('phpbb_feed_overall', array('mode' => $mode), false);
|
|
}
|
|
catch (InvalidParameterException $e)
|
|
{
|
|
$url = $controller_helper->route('phpbb_feed_index');
|
|
}
|
|
}
|
|
|
|
$response = new RedirectResponse($url, 301);
|
|
$response->send();
|