This commit is contained in:
Pachira 2015-04-02 16:21:37 +02:00
parent f4e5c151f8
commit 0a34bf911b
2 changed files with 5 additions and 1 deletions

View file

@ -24,6 +24,10 @@ RewriteRule ^(.*)$ $1.php
## Info pages
RewriteRule ^r/([a-z]+)$ infopage.php?r=$1
## News
RewriteRule ^news/([0-9]+)$ news.php?id=$1
RewriteRule ^news.xml$ news.php?xml
# Serving Images
RewriteRule ^a/([0-9]+)$ imageserve.php?m=avatar&u=$1
RewriteRule ^a/([0-9]+).png$ imageserve.php?m=avatar&u=$1

View file

@ -13,7 +13,7 @@ require_once '/var/www/flashii.net/_sakura/sakura.php';
$renderData['page'] = [
'title' => 'Flashii News'
];
$renderData['newsPosts'] = Main::getNewsPosts();
$renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && is_numeric($_GET['id'])) ? $_GET['id'] : null);
// Print page contents
print Main::tplRender('main/news.tpl', $renderData);