diff options
author | Bot <bot@myigel.name> | 2017-01-21 19:47:44 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-21 20:12:48 +0100 |
commit | 740026a9de6cba73c4e77aba78950d0a791b6b62 (patch) | |
tree | 187eb8fc8bccf731c095c00d6f8108ba0f4b8b06 /includes/pages/admin_groups.php | |
parent | 915ce28feeb9104bf7854ccbd80caebb5dce4aaa (diff) |
Replaced [0-9] with \d
Diffstat (limited to 'includes/pages/admin_groups.php')
-rw-r--r-- | includes/pages/admin_groups.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php index 104fa274..4011ccf1 100644 --- a/includes/pages/admin_groups.php +++ b/includes/pages/admin_groups.php @@ -53,7 +53,7 @@ function admin_groups() } else { switch ($_REQUEST['action']) { case 'edit': - if (isset($_REQUEST['id']) && preg_match('/^-[0-9]{1,11}$/', $_REQUEST['id'])) { + if (isset($_REQUEST['id']) && preg_match('/^-\d{1,11}$/', $_REQUEST['id'])) { $group_id = $_REQUEST['id']; } else { return error('Incomplete call, missing Groups ID.', true); @@ -99,7 +99,7 @@ function admin_groups() break; case 'save': - if (isset($_REQUEST['id']) && preg_match('/^-[0-9]{1,11}$/', $_REQUEST['id'])) { + if (isset($_REQUEST['id']) && preg_match('/^-\d{1,11}$/', $_REQUEST['id'])) { $group_id = $_REQUEST['id']; } else { return error('Incomplete call, missing Groups ID.', true); @@ -114,7 +114,7 @@ function admin_groups() DB::delete('DELETE FROM `GroupPrivileges` WHERE `group_id`=?', [$group_id]); $privilege_names = []; foreach ($_REQUEST['privileges'] as $privilege) { - if (preg_match('/^[0-9]{1,}$/', $privilege)) { + if (preg_match('/^\d{1,}$/', $privilege)) { $group_privileges_source = DB::select( 'SELECT `name` FROM `Privileges` WHERE `id`=? LIMIT 1', [$privilege] |