diff options
author | Bot <bot@myigel.name> | 2017-01-03 14:12:17 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-03 15:32:59 +0100 |
commit | 55141154c083acc2d0397f4c62b4e0be1c7a19fa (patch) | |
tree | 7e5e54a19f7df976fa68c42f21f1484112a7c257 /includes/pages/user_atom.php | |
parent | 356b2582f3e6a43ecf2607acad4a7fe0b37f659a (diff) |
Replaced " with '
Diffstat (limited to 'includes/pages/user_atom.php')
-rw-r--r-- | includes/pages/user_atom.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php index 42217a3a..913a8821 100644 --- a/includes/pages/user_atom.php +++ b/includes/pages/user_atom.php @@ -7,17 +7,17 @@ function user_atom() { global $user, $display_news; - if (!isset($_REQUEST['key']) || !preg_match("/^[0-9a-f]{32}$/", $_REQUEST['key'])) { - engelsystem_error("Missing key."); + if (!isset($_REQUEST['key']) || !preg_match('/^[0-9a-f]{32}$/', $_REQUEST['key'])) { + engelsystem_error('Missing key.'); } $key = $_REQUEST['key']; $user = User_by_api_key($key); if ($user == null) { - engelsystem_error("Key invalid."); + engelsystem_error('Key invalid.'); } if (!in_array('atom', privileges_for_user($user['UID']))) { - engelsystem_error("No privilege for atom."); + engelsystem_error('No privilege for atom.'); } $news = sql_select(" @@ -31,7 +31,7 @@ function user_atom() $output = make_atom_entries_from_news($news); header('Content-Type: application/atom+xml; charset=utf-8'); - header("Content-Length: " . strlen($output)); + header('Content-Length: ' . strlen($output)); raw_output($output); } @@ -51,21 +51,21 @@ function make_atom_entries_from_news($news_entries) $_SERVER['REQUEST_URI'] )) . '</id> - <updated>' . date('Y-m-d\TH:i:sP', $news_entries[0]['Datum']) . "</updated>\n"; + <updated>' . date('Y-m-d\TH:i:sP', $news_entries[0]['Datum']) . '</updated>' . "\n"; foreach ($news_entries as $news_entry) { $html .= make_atom_entry_from_news($news_entry); } - $html .= "</feed>"; + $html .= '</feed>'; return $html; } function make_atom_entry_from_news($news_entry) { - return " <entry> - <title>" . htmlspecialchars($news_entry['Betreff']) . "</title> - <link href=\"" . page_link_to_absolute("news_comments&nid=") . "${news_entry['ID']}\"/> - <id>" . preg_replace('#^https?://#', '', page_link_to_absolute("news")) . "-${news_entry['ID']}</id> - <updated>" . date('Y-m-d\TH:i:sP', $news_entry['Datum']) . "</updated> - <summary type=\"html\">" . htmlspecialchars($news_entry['Text']) . "</summary> - </entry>\n"; + return ' <entry> + <title>' . htmlspecialchars($news_entry['Betreff']) . '</title> + <link href="' . page_link_to_absolute('news_comments&nid=') . $news_entry['ID'] . '"/> + <id>' . preg_replace('#^https?://#', '', page_link_to_absolute('news')) . '-' . $news_entry['ID'] . '</id> + <updated>' . date('Y-m-d\TH:i:sP', $news_entry['Datum']) . '</updated> + <summary type="html">' . htmlspecialchars($news_entry['Text']) . '</summary> + </entry>' . "\n"; } |