summaryrefslogtreecommitdiff
path: root/includes/pages/user_myshifts.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-09-11 17:52:55 +0200
committerGitHub <noreply@github.com>2017-09-11 17:52:55 +0200
commit359160613027a480620e22deef19ff883eaaeb21 (patch)
tree310600aaa23404f0cd7d3e198bacdbc93645da32 /includes/pages/user_myshifts.php
parent581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff)
parent0a20883aa862779b48fd2a297456c2db04cffb95 (diff)
Merge pull request #344 from MyIgel/master
Prepared routing, added symfony http Closes #336 and closes #337
Diffstat (limited to 'includes/pages/user_myshifts.php')
-rw-r--r--includes/pages/user_myshifts.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 81f8f505..836bd566 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -37,16 +37,16 @@ function user_myshifts()
if ($request->input('reset') == 'ack') {
User_reset_api_key($user);
success(_('Key changed.'));
- redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
+ redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']]));
}
return page_with_title(_('Reset API key'), [
error(
_('If you reset the key, the url to your iCal- and JSON-export and your atom feed changes! You have to update it in every application using one of these exports.'),
true
),
- button(page_link_to('user_myshifts') . '&reset=ack', _('Continue'), 'btn-danger')
+ button(page_link_to('user_myshifts', ['reset' => 'ack']), _('Continue'), 'btn-danger')
]);
- } elseif ($request->has('edit') && preg_match('/^\d*$/', $request->input('edit'))) {
+ } elseif ($request->has('edit') && preg_match('/^\d+$/', $request->input('edit'))) {
$user_id = $request->input('edit');
$shift = DB::selectOne('
SELECT
@@ -106,7 +106,7 @@ function user_myshifts()
. '. Freeloaded: ' . ($freeloaded ? 'YES Comment: ' . $freeload_comment : 'NO')
);
success(_('Shift saved.'));
- redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
+ redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']]));
}
}
@@ -124,7 +124,7 @@ function user_myshifts()
} else {
redirect(page_link_to('user_myshifts'));
}
- } elseif ($request->has('cancel') && preg_match('/^\d*$/', $request->input('cancel'))) {
+ } elseif ($request->has('cancel') && preg_match('/^\d+$/', $request->input('cancel'))) {
$user_id = $request->input('cancel');
$shift = DB::selectOne('
SELECT *
@@ -164,6 +164,6 @@ function user_myshifts()
}
}
- redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
+ redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']]));
return '';
}