summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-09 13:07:42 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-09 13:07:42 +0000
commit974cbfe036e2628e3f46ccb7ec11f90bfed62fe1 (patch)
tree1a9371572aadc2005d1df27518a662b65aff0e84 /usr/local/www
parent00fc80fe0582e41b91cd1612b906f0875adeef8b (diff)
downloadpfsense-974cbfe036e2628e3f46ccb7ec11f90bfed62fe1.zip
pfsense-974cbfe036e2628e3f46ccb7ec11f90bfed62fe1.tar.gz
Ticket #338. Remove aliases_sort function and keep the list always sorted in config.xml. This reverts to previous behaviour.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_aliases.php2
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php5
-rwxr-xr-xusr/local/www/firewall_aliases_import.php6
-rwxr-xr-xusr/local/www/guiconfig.inc11
4 files changed, 7 insertions, 17 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 6e3f6de..de5703d 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -48,8 +48,6 @@ require_once("shaper.inc");
if (!is_array($config['aliases']['alias']))
$config['aliases']['alias'] = array();
-
-aliases_sort();
$a_aliases = &$config['aliases']['alias'];
if ($_POST) {
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 36126de..d974bb43 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -58,8 +58,6 @@ $reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
if (!is_array($config['aliases']['alias']))
$config['aliases']['alias'] = array();
-
-aliases_sort();
$a_aliases = &$config['aliases']['alias'];
if($_POST)
@@ -298,6 +296,9 @@ if ($_POST) {
mark_subsystem_dirty('aliases');
+ // Sort list
+ $a_aliases = msort($a_aliases, "name");
+
write_config();
filter_configure();
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php
index 0f26edb..3f09243 100755
--- a/usr/local/www/firewall_aliases_import.php
+++ b/usr/local/www/firewall_aliases_import.php
@@ -51,8 +51,6 @@ $reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
if (!is_array($config['aliases']['alias']))
$config['aliases']['alias'] = array();
-
-aliases_sort();
$a_aliases = &$config['aliases']['alias'];
if($_POST['aliasimport'] <> "") {
@@ -97,6 +95,10 @@ if($_POST['aliasimport'] <> "") {
$alias['type'] = "network";
$alias['descr'] = $_POST['descr'];
$a_aliases[] = $alias;
+
+ // Sort list
+ $a_aliases = msort($a_aliases, "name");
+
write_config();
pfSenseHeader("firewall_aliases.php");
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 5a32d81..8906d56 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -402,17 +402,6 @@ function filter_rules_sort() {
unset($config['filter']['rule'][$i]['seq']);
}
-function aliases_sort() {
- global $g, $config;
-
- function aliascmp(&$a, $b) {
- return strcmp($a['name'], $b['name']);
- }
-
- if($config['aliases'])
- usort($config['aliases']['alias'], "aliascmp");
-}
-
function gentitle($title) {
global $navlevelsep;
if(!is_array($title))
OpenPOWER on IntegriCloud