aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/functions.php2
-rw-r--r--core/include/feed/main.php10
2 files changed, 9 insertions, 3 deletions
diff --git a/core/functions.php b/core/functions.php
index 35faed4..6ef8894 100644
--- a/core/functions.php
+++ b/core/functions.php
@@ -265,7 +265,7 @@ function description($string, $length = 200, $replace = ' […]') {
#===============================================================================
# Generate a valid slug URL part from a string
#===============================================================================
-function makeSlugURL($string, $separator = '-') {
+function generateSlug($string, $separator = '-') {
$string = strtr(mb_strtolower($string), [
'ä' => 'ae',
'ö' => 'oe',
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) {