summaryrefslogtreecommitdiff
path: root/includes/pages/admin_shifts.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-21 19:47:44 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-21 20:12:48 +0100
commit740026a9de6cba73c4e77aba78950d0a791b6b62 (patch)
tree187eb8fc8bccf731c095c00d6f8108ba0f4b8b06 /includes/pages/admin_shifts.php
parent915ce28feeb9104bf7854ccbd80caebb5dce4aaa (diff)
Replaced [0-9] with \d
Diffstat (limited to 'includes/pages/admin_shifts.php')
-rw-r--r--includes/pages/admin_shifts.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php
index c543e827..06071233 100644
--- a/includes/pages/admin_shifts.php
+++ b/includes/pages/admin_shifts.php
@@ -72,7 +72,7 @@ function admin_shifts()
// Auswahl der sichtbaren Locations für die Schichten
if (
isset($_REQUEST['rid'])
- && preg_match('/^[0-9]+$/', $_REQUEST['rid'])
+ && preg_match('/^\d+$/', $_REQUEST['rid'])
&& isset($room_array[$_REQUEST['rid']])
) {
$rid = $_REQUEST['rid'];
@@ -105,7 +105,7 @@ function admin_shifts()
if ($_REQUEST['mode'] == 'single') {
$mode = 'single';
} elseif ($_REQUEST['mode'] == 'multi') {
- if (isset($_REQUEST['length']) && preg_match('/^[0-9]+$/', trim($_REQUEST['length']))) {
+ if (isset($_REQUEST['length']) && preg_match('/^\d+$/', trim($_REQUEST['length']))) {
$mode = 'multi';
$length = trim($_REQUEST['length']);
} else {
@@ -115,7 +115,7 @@ function admin_shifts()
} elseif ($_REQUEST['mode'] == 'variable') {
if (
isset($_REQUEST['change_hours'])
- && preg_match('/^([0-9]{2}(,|$))/', trim(str_replace(' ', '', $_REQUEST['change_hours'])))
+ && preg_match('/^(\d{2}(,|$))/', trim(str_replace(' ', '', $_REQUEST['change_hours'])))
) {
$mode = 'variable';
$change_hours = array_map('trim', explode(',', $_REQUEST['change_hours']));
@@ -137,7 +137,7 @@ function admin_shifts()
foreach ($types as $type) {
if (
isset($_REQUEST['type_' . $type['id']])
- && preg_match('/^[0-9]+$/', trim($_REQUEST['type_' . $type['id']]))
+ && preg_match('/^\d+$/', trim($_REQUEST['type_' . $type['id']]))
) {
$needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]);
} else {