summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-02-19 08:37:54 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-02-19 08:38:16 -0500
commit06683083f76252eb577cf146c33b365d46a3a615 (patch)
tree6e43f896798b6d05d5c2ae9b7e25891529148704 /src
parentada3eeb33cadce1c05b67462c03bb51d6646cba2 (diff)
downloadpfsense-06683083f76252eb577cf146c33b365d46a3a615.zip
pfsense-06683083f76252eb577cf146c33b365d46a3a615.tar.gz
Fixed #5908
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/system_groupmanager.php16
-rw-r--r--src/usr/local/www/system_groupmanager_addprivs.php16
2 files changed, 16 insertions, 16 deletions
diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php
index fbe3061..0bca4c5 100644
--- a/src/usr/local/www/system_groupmanager.php
+++ b/src/usr/local/www/system_groupmanager.php
@@ -74,6 +74,7 @@ if (!is_array($config['system']['group'])) {
$a_group = &$config['system']['group'];
unset($id);
+
if (isset($_POST['groupid']) && is_numericint($_POST['groupid'])) {
$id = $_POST['groupid'];
}
@@ -84,6 +85,19 @@ if (isset($_GET['groupid']) && is_numericint($_GET['groupid'])) {
$act = (isset($_GET['act']) ? $_GET['act'] : '');
+function cpusercmp($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+}
+function admin_groups_sort() {
+ global $a_group;
+
+ if (!is_array($a_group)) {
+ return;
+ }
+
+ usort($a_group, "cpusercmp");
+}
+
if ($act == "delgroup") {
if (!isset($id) || !isset($_GET['groupname']) || !isset($a_group[$id]) || ($_GET['groupname'] != $a_group[$id]['name'])) {
@@ -203,6 +217,8 @@ if (isset($_POST['save'])) {
$a_group[] = $group;
}
+ admin_groups_sort();
+
conf_mount_rw();
local_group_set($group);
conf_mount_ro();
diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php
index 381a591..5957c92 100644
--- a/src/usr/local/www/system_groupmanager_addprivs.php
+++ b/src/usr/local/www/system_groupmanager_addprivs.php
@@ -64,20 +64,6 @@
##|*MATCH=system_groupmanager_addprivs.php*
##|-PRIV
-function cpusercmp($a, $b) {
- return strcasecmp($a['name'], $b['name']);
-}
-
-function admin_groups_sort() {
- global $config;
-
- if (!is_array($config['system']['group'])) {
- return;
- }
-
- usort($config['system']['group'], "cpusercmp");
-}
-
require("guiconfig.inc");
$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Groups"), gettext("Edit"), gettext("Add Privileges"));
@@ -142,8 +128,6 @@ if ($_POST) {
}
}
- admin_groups_sort();
-
$retval = write_config();
$savemsg = get_std_save_message($retval);
OpenPOWER on IntegriCloud