Fixed some routing oversights.
This commit is contained in:
parent
472fc0decc
commit
6274f7f8d3
1 changed files with 6 additions and 4 deletions
|
@ -211,7 +211,7 @@ class MisuzuContext {
|
||||||
$response->redirect($location, true);
|
$response->redirect($location, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->router->get('/news/index.php', function($response) {
|
$this->router->get('/news/index.php', function($response, $request) {
|
||||||
$response->redirect(url('news-index', [
|
$response->redirect(url('news-index', [
|
||||||
'page' => $request->getParam('page', FILTER_SANITIZE_NUMBER_INT),
|
'page' => $request->getParam('page', FILTER_SANITIZE_NUMBER_INT),
|
||||||
]), true);
|
]), true);
|
||||||
|
@ -235,21 +235,23 @@ class MisuzuContext {
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->router->get('/news/feed.php/rss', function($response, $request) {
|
$this->router->get('/news/feed.php/rss', function($response, $request) {
|
||||||
|
$catId = (int)$request->getParam('c', FILTER_SANITIZE_NUMBER_INT);
|
||||||
$response->redirect(url(
|
$response->redirect(url(
|
||||||
$catId > 0 ? 'news-category-feed-rss' : 'news-feed-rss',
|
$catId > 0 ? 'news-category-feed-rss' : 'news-feed-rss',
|
||||||
['category' => $request->getParam('c', FILTER_SANITIZE_NUMBER_INT)]
|
['category' => $catId]
|
||||||
), true);
|
), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->router->get('/news/feed.php/atom', function($response, $request) {
|
$this->router->get('/news/feed.php/atom', function($response, $request) {
|
||||||
|
$catId = (int)$request->getParam('c', FILTER_SANITIZE_NUMBER_INT);
|
||||||
$response->redirect(url(
|
$response->redirect(url(
|
||||||
$catId > 0 ? 'news-category-feed-atom' : 'news-feed-atom',
|
$catId > 0 ? 'news-category-feed-atom' : 'news-feed-atom',
|
||||||
['category' => $request->getParam('c', FILTER_SANITIZE_NUMBER_INT)]
|
['category' => $catId]
|
||||||
), true);
|
), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->router->get('/user-assets.php', function($response, $request) {
|
$this->router->get('/user-assets.php', function($response, $request) {
|
||||||
return (new \Misuzu\Http\Handlers\AssetsHandler)->serveLegacy($response, $request);
|
return (new \Misuzu\Http\Handlers\AssetsHandler($this))->serveLegacy($response, $request);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue