summaryrefslogtreecommitdiffstats
path: root/modules-available/news/api.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/news/api.inc.php')
-rw-r--r--modules-available/news/api.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/news/api.inc.php b/modules-available/news/api.inc.php
index cbfaa82b..851f31a8 100644
--- a/modules-available/news/api.inc.php
+++ b/modules-available/news/api.inc.php
@@ -6,7 +6,7 @@ $type = Request::any('type', 'news', 'string');
// Fetch news from DB
$row = Database::queryFirst('SELECT title, content, dateline FROM vmchooser_pages'
- . ' WHERE type = :type ORDER BY dateline DESC LIMIT 1', compact('type'));
+ . ' WHERE type = :type AND expires > UNIX_TIMESTAMP() ORDER BY dateline DESC LIMIT 1', compact('type'));
if ($row !== false ) {
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
@@ -15,7 +15,7 @@ if ($row !== false ) {
echo "\t\t" . htmlspecialchars($row['title']) . "\n";
echo "\t" . '</headline>' . "\n";
echo "\t" . "<info>" . "\n";
- echo "\t\t" . htmlspecialchars(nl2br($row['content'])) . "\n";
+ echo "\t\t" . htmlspecialchars($row['content']) . "\n";
echo "\t" . '</info>' . "\n";
echo "\t" . "<date>" . "\n";
echo "\t\t" . $row['dateline'] . "\n";