From d78c234a7244e93ac53fc7bcba8cdb152fa00130 Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Fri, 24 Jun 2016 17:23:35 +0200
Subject: [news] Move over global news API, add support for type param
---
modules-available/news/api.inc.php | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 modules-available/news/api.inc.php
(limited to 'modules-available/news')
diff --git a/modules-available/news/api.inc.php b/modules-available/news/api.inc.php
new file mode 100644
index 00000000..cbfaa82b
--- /dev/null
+++ b/modules-available/news/api.inc.php
@@ -0,0 +1,29 @@
+' . "\n";
+ echo "" . "\n";
+ echo "\t" . '' . "\n";
+ echo "\t\t" . htmlspecialchars($row['title']) . "\n";
+ echo "\t" . '' . "\n";
+ echo "\t" . "" . "\n";
+ echo "\t\t" . htmlspecialchars(nl2br($row['content'])) . "\n";
+ echo "\t" . '' . "\n";
+ echo "\t" . "" . "\n";
+ echo "\t\t" . $row['dateline'] . "\n";
+ echo "\t" . "" . "\n";
+ echo "";
+
+} else {
+ // no news in DB, output a 'null' news xml
+ echo '' . "\n";
+ echo "null";
+}
--
cgit v1.2.3-55-g7522