From e33c245d910e55b8cab407a03e669470509a705d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 10 Mar 2017 21:46:12 +0100 Subject: Several changes have been made in this commit, which together with the previous commits result in version 1.1: + The rules for the Apache and nginx configuration have been changed and redirects now all requests to the index.php. + A router class has been added which now handles all requests that arrives at the application on the index.php. + Short-hand functions "PAGE", "POST" and "USER" for use in templates added to get specific item data by ID. + More language variables have been added to the core language. --- system/feed/main.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'system/feed') diff --git a/system/feed/main.php b/system/feed/main.php index 00ac4b8..ffb9b3a 100644 --- a/system/feed/main.php +++ b/system/feed/main.php @@ -1,8 +1,9 @@ query(sprintf($execSQL, Post\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN); @@ -34,7 +35,7 @@ try { } } - if(HTTP::GET('item') !== 'post') { + if(!isset($param) OR $param !== 'post') { $execSQL = 'SELECT id FROM %s ORDER BY '.Application::get('PAGE.FEED_SORT').' LIMIT '.Application::get('PAGE.FEED_SIZE'); $pageIDs = $Database->query(sprintf($execSQL, Page\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN); @@ -57,7 +58,7 @@ try { $FeedTemplate = Template\Factory::build('feed/main'); $FeedTemplate->set('FEED', [ - 'TYPE' => HTTP::GET('item'), + 'TYPE' => $param ?? NULL, 'LIST' => [ 'POSTS' => $posts ?? [], 'PAGES' => $pages ?? [], -- cgit v1.2.3