summaryrefslogtreecommitdiff
path: root/includes/controller/shifts_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-01 10:48:19 +0200
committermsquare <msquare@notrademark.de>2016-10-01 10:48:19 +0200
commitd5d2acc7d80920eef5f0ed779a3738a12d5db348 (patch)
treed2d7eb680c1ecaf72480893bba252ab2d9958804 /includes/controller/shifts_controller.php
parent6dfefc3bb9f054c472156801e37300059444ecc7 (diff)
improve code style
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r--includes/controller/shifts_controller.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php
index 52162b9e..b29a819f 100644
--- a/includes/controller/shifts_controller.php
+++ b/includes/controller/shifts_controller.php
@@ -137,12 +137,12 @@ function shifts_json_export_all_controller() {
function shifts_json_export_controller() {
global $ical_shifts, $user;
- 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) {
engelsystem_error("Unable to find user.");