From 7313e15ce8236e19331fb6639a3a5b97c8f06ecd Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 2 Jan 2017 03:57:23 +0100 Subject: PSR-2 formatting --- includes/pages/user_atom.php | 58 +++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'includes/pages/user_atom.php') diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php index 9a765634..88e8f201 100644 --- a/includes/pages/user_atom.php +++ b/includes/pages/user_atom.php @@ -1,46 +1,49 @@ +function make_atom_entries_from_news($news_entries) +{ + $html = ' Engelsystem ' . $_SERVER['HTTP_HOST'] . htmlspecialchars(preg_replace('#[&?]key=[a-f0-9]{32}#', '', $_SERVER['REQUEST_URI'])) . ' ' . date('Y-m-d\TH:i:sP', $news_entries[0]['Datum']) . "\n"; - foreach ($news_entries as $news_entry) { - $html .= make_atom_entry_from_news($news_entry); - } - $html .= ""; - return $html; + foreach ($news_entries as $news_entry) { + $html .= make_atom_entry_from_news($news_entry); + } + $html .= ""; + return $html; } -function make_atom_entry_from_news($news_entry) { - return " +function make_atom_entry_from_news($news_entry) +{ + return " " . htmlspecialchars($news_entry['Betreff']) . " " . preg_replace('#^https?://#', '', page_link_to_absolute("news")) . "-${news_entry['ID']} @@ -48,4 +51,3 @@ function make_atom_entry_from_news($news_entry) { " . htmlspecialchars($news_entry['Text']) . " \n"; } -?> -- cgit v1.2.3-54-g00ecf