From 740026a9de6cba73c4e77aba78950d0a791b6b62 Mon Sep 17 00:00:00 2001 From: Bot Date: Sat, 21 Jan 2017 19:47:44 +0100 Subject: Replaced [0-9] with \d --- includes/pages/user_myshifts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes/pages/user_myshifts.php') diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 76b79032..acb78875 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -23,7 +23,7 @@ function user_myshifts() if ( isset($_REQUEST['id']) && in_array('user_shifts_admin', $privileges) - && preg_match('/^[0-9]{1,}$/', $_REQUEST['id']) + && preg_match('/^\d{1,}$/', $_REQUEST['id']) && count(DB::select('SELECT `UID` FROM `User` WHERE `UID`=?', [$_REQUEST['id']])) > 0 ) { $user_id = $_REQUEST['id']; @@ -47,7 +47,7 @@ function user_myshifts() ), button(page_link_to('user_myshifts') . '&reset=ack', _('Continue'), 'btn-danger') ]); - } elseif (isset($_REQUEST['edit']) && preg_match('/^[0-9]*$/', $_REQUEST['edit'])) { + } elseif (isset($_REQUEST['edit']) && preg_match('/^\d*$/', $_REQUEST['edit'])) { $user_id = $_REQUEST['edit']; $shift = DB::select(' SELECT @@ -129,7 +129,7 @@ function user_myshifts() } else { redirect(page_link_to('user_myshifts')); } - } elseif (isset($_REQUEST['cancel']) && preg_match('/^[0-9]*$/', $_REQUEST['cancel'])) { + } elseif (isset($_REQUEST['cancel']) && preg_match('/^\d*$/', $_REQUEST['cancel'])) { $user_id = $_REQUEST['cancel']; $shift = DB::select(' SELECT * -- cgit v1.2.3-70-g09d2