summaryrefslogtreecommitdiff
path: root/includes/pages/admin_groups.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/admin_groups.php')
-rw-r--r--includes/pages/admin_groups.php6
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]