diff options
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/admin_arrive.php | 4 | ||||
-rw-r--r-- | includes/pages/admin_import.php | 20 | ||||
-rw-r--r-- | includes/pages/admin_user.php | 4 | ||||
-rw-r--r-- | includes/pages/user_myshifts.php | 4 |
4 files changed, 18 insertions, 14 deletions
diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 2f312b1f..48e2c91f 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -23,7 +23,7 @@ function admin_arrive() $search = strip_request_item('search'); } - if ($request->has('reset') && preg_match('/^\d*$/', $request->input('reset'))) { + if ($request->has('reset') && preg_match('/^\d+$/', $request->input('reset'))) { $user_id = $request->input('reset'); $user_source = User($user_id); if ($user_source != null) { @@ -39,7 +39,7 @@ function admin_arrive() } else { $msg = error(_('Angel not found.'), true); } - } elseif ($request->has('arrived') && preg_match('/^\d*$/', $request->input('arrived'))) { + } elseif ($request->has('arrived') && preg_match('/^\d+$/', $request->input('arrived'))) { $user_id = $request->input('arrived'); $user_source = User($user_id); if ($user_source != null) { diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index bf8c498c..e97f95e1 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -98,10 +98,12 @@ function admin_import() if ($valid) { redirect( - page_link_to('admin_import') - . '&step=check&shifttype_id=' . $shifttype_id - . '&add_minutes_end=' . $add_minutes_end - . '&add_minutes_start=' . $add_minutes_start + page_link_to('admin_import', [ + 'step' => 'check', + 'shifttype_id' => $shifttype_id, + 'add_minutes_end' => $add_minutes_end, + 'add_minutes_start' => $add_minutes_start, + ]) ); } else { $html .= div('well well-sm text-center', [ @@ -207,10 +209,12 @@ function admin_import() ], shifts_printable($events_deleted, $shifttypes)), form_submit('submit', _('Import')) ], - page_link_to('admin_import') - . '&step=import&shifttype_id=' . $shifttype_id - . '&add_minutes_end=' . $add_minutes_end - . '&add_minutes_start=' . $add_minutes_start + page_link_to('admin_import', [ + 'step' => 'import', + 'shifttype_id' => $shifttype_id, + 'add_minutes_end' => $add_minutes_end, + 'add_minutes_start' => $add_minutes_start, + ]) ); break; diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 9b3b0f44..0620155b 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -179,11 +179,11 @@ function admin_user() switch ($request->input('action')) { case 'save_groups': if ($user_id != $user['UID']) { - $my_highest_group = DB::select( + $my_highest_group = DB::selectOne( 'SELECT * FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id`', [$user['UID']] ); - $his_highest_group = DB::select( + $his_highest_group = DB::selectOne( 'SELECT * FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id`', [$user_id] ); diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 60a26922..836bd566 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -46,7 +46,7 @@ function user_myshifts() ), 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 @@ -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 * |