// forgot to empty this file
This commit is contained in:
parent
b66eb8ba76
commit
f9962f02f3
1 changed files with 0 additions and 28 deletions
|
@ -1,30 +1,2 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/index.php';
|
||||
return;
|
||||
//namespace Misuzu;
|
||||
|
||||
require_once '../misuzu.php';
|
||||
|
||||
http_response_code(301);
|
||||
$location = url('news-index');
|
||||
|
||||
if(!empty($_GET['n']) && is_string($_GET['n'])) {
|
||||
$location = url('news-post', [
|
||||
'post' => (int)$_GET['n'],
|
||||
]);
|
||||
}
|
||||
|
||||
$feedMode = trim($_SERVER['PATH_INFO'] ?? '', '/');
|
||||
$categoryId = !empty($_GET['c']) && is_string($_GET['c']) ? (int)$_GET['c'] : 0;
|
||||
$postId = !empty($_GET['p']) && is_string($_GET['p']) ? (int)$_GET['p'] : 0;
|
||||
|
||||
if(!empty($feedMode) && in_array($feedMode, ['rss', 'atom'])) {
|
||||
$location = empty($categoryId) ? url("news-feed-{$feedMode}") : url("news-category-feed-{$feedMode}", ['category' => $categoryId]);
|
||||
}
|
||||
|
||||
if($postId > 0)
|
||||
$location = url('news-post', ['post' => $postId]);
|
||||
if($categoryId > 0)
|
||||
$location = url('news-category', ['category' => $categoryId, 'page' => Pagination::param('page')]);
|
||||
|
||||
redirect($location);
|
||||
|
|
Loading…
Reference in a new issue