diff options
author | msquare <msquare@notrademark.de> | 2017-07-20 18:34:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 18:34:19 +0200 |
commit | 37d4edcd9ace5021b6eb02761a9c3865c5607f33 (patch) | |
tree | 16c0da4cd2d9c6c10f5d5e02c1b02bd0986636c2 /includes/pages/user_atom.php | |
parent | 9b3f6f557a127fef16be267c26f8239dc1c22126 (diff) | |
parent | b7ebb05b8e71b391b6b029fceb5a2d00ff27004c (diff) |
Merge pull request #328 from MyIgel/master
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/pages/user_atom.php')
-rw-r--r-- | includes/pages/user_atom.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php index d7c77d52..a1e2580a 100644 --- a/includes/pages/user_atom.php +++ b/includes/pages/user_atom.php @@ -3,16 +3,17 @@ use Engelsystem\Database\DB; /** - * Publically available page to feed the news to feedreaders + * Publically available page to feed the news to feed readers */ function user_atom() { global $user; + $request = request(); - if (!isset($_REQUEST['key']) || !preg_match('/^[\da-f]{32}$/', $_REQUEST['key'])) { + if (!$request->has('key') || !preg_match('/^[\da-f]{32}$/', $request->input('key'))) { engelsystem_error('Missing key.'); } - $key = $_REQUEST['key']; + $key = $request->input('key'); $user = User_by_api_key($key); if ($user == null) { @@ -25,7 +26,7 @@ function user_atom() $news = DB::select(' SELECT * FROM `News` - ' . (empty($_REQUEST['meetings']) ? '' : 'WHERE `Treffen` = 1 ') . ' + ' . (!$request->has('meetings') ? '' : 'WHERE `Treffen` = 1 ') . ' ORDER BY `ID` DESC LIMIT ' . (int)config('display_news') ); |