summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-08-22 19:23:23 +0200
committermsquare <msquare@notrademark.de>2016-08-22 19:23:23 +0200
commit14d20933f7dcbf6d4aab3ee2c6444a19c7afdfd6 (patch)
tree8832b8e4a8925ce2f9fd246aa8beede8a2818d65 /includes
parent54e6f422ceb9b621b8cd405265e7ce3743c5fa15 (diff)
improve quality of user atom
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_atom.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php
index 19abca61..81eb1670 100644
--- a/includes/pages/user_atom.php
+++ b/includes/pages/user_atom.php
@@ -4,11 +4,10 @@
function user_atom() {
global $user, $DISPLAY_NEWS;
- if (isset($_REQUEST['key']) && preg_match("/^[0-9a-f]{32}$/", $_REQUEST['key'])) {
- $key = $_REQUEST['key'];
- } else {
+ 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 === false) {
@@ -27,7 +26,7 @@ function user_atom() {
header('Content-Type: application/atom+xml; charset=utf-8');
header("Content-Length: " . strlen($output));
- raw_output($html);
+ raw_output($output);
}
function make_atom_entries_from_news($news_entries) {