summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules-available/news/api.inc.php (renamed from apis/news.inc.php)5
1 files changed, 4 insertions, 1 deletions
diff --git a/apis/news.inc.php b/modules-available/news/api.inc.php
index 610db289..cbfaa82b 100644
--- a/apis/news.inc.php
+++ b/modules-available/news/api.inc.php
@@ -2,8 +2,11 @@
header('Content-Type: application/xml; charset=utf-8');
+$type = Request::any('type', 'news', 'string');
+
// Fetch news from DB
-$row = Database::queryFirst('SELECT title, content, dateline FROM news ORDER BY dateline DESC LIMIT 1');
+$row = Database::queryFirst('SELECT title, content, dateline FROM vmchooser_pages'
+ . ' WHERE type = :type ORDER BY dateline DESC LIMIT 1', compact('type'));
if ($row !== false ) {
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";