aboutsummaryrefslogtreecommitdiffstats
path: root/core/include
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-07-07 22:30:05 +0200
committerThomas Lange <code@nerdmind.de>2017-07-07 22:30:05 +0200
commit3e629a13415391e70e4e915f7706f3828912da20 (patch)
tree9d0d6b59a9e752a9d9a00e11a85affa33ac08887 /core/include
parent8cafd4967655a996d0d2b71073f884e2f28cf6ac (diff)
downloadblog-3e629a13415391e70e4e915f7706f3828912da20.tar.gz
blog-3e629a13415391e70e4e915f7706f3828912da20.tar.xz
blog-3e629a13415391e70e4e915f7706f3828912da20.zip
The function "makeSlugURL" has been renamed to "generateSlug" because the name was misleading because the function did not generate a complete URL, but only a partial string (the slug) for the final URL. By the way, some improvements were made to the code.
Diffstat (limited to 'core/include')
-rw-r--r--core/include/feed/main.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/include/feed/main.php b/core/include/feed/main.php
index 8879e72..b8e03dc 100644
--- a/core/include/feed/main.php
+++ b/core/include/feed/main.php
@@ -15,7 +15,10 @@ HTTP::responseHeader(HTTP::HEADER_CONTENT_TYPE, HTTP::CONTENT_TYPE_XML);
#===============================================================================
try {
if(!isset($param) OR $param !== 'page') {
- $execSQL = 'SELECT id FROM %s ORDER BY '.Application::get('POST.FEED_SORT').' LIMIT '.Application::get('POST.FEED_SIZE');
+ $POST['FEED_SORT'] = Application::get('POST.FEED_SORT');
+ $POST['FEED_SIZE'] = Application::get('POST.FEED_SIZE');
+
+ $execSQL = "SELECT id FROM %s ORDER BY {$POST['FEED_SORT']} LIMIT {$POST['FEED_SIZE']}";
$postIDs = $Database->query(sprintf($execSQL, Post\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN);
foreach($postIDs as $postID) {
@@ -36,7 +39,10 @@ try {
}
if(!isset($param) OR $param !== 'post') {
- $execSQL = 'SELECT id FROM %s ORDER BY '.Application::get('PAGE.FEED_SORT').' LIMIT '.Application::get('PAGE.FEED_SIZE');
+ $PAGE['FEED_SORT'] = Application::get('PAGE.FEED_SORT');
+ $PAGE['FEED_SIZE'] = Application::get('PAGE.FEED_SIZE');
+
+ $execSQL = "SELECT id FROM %s ORDER BY {$PAGE['FEED_SORT']} LIMIT {$PAGE['FEED_SIZE']}";
$pageIDs = $Database->query(sprintf($execSQL, Page\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN);
foreach($pageIDs as $pageID) {