summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/index.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-15 15:58:47 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-15 15:58:47 -0500
commit762ed9137d9a03d77ad56e57488f862e26d3e2c7 (patch)
tree669f84bce474d736ceb6ee13bdaec67a209b890e /src/usr/local/www/index.php
parentba23527b3449cdf5a192574b3a1aaf05c7fef8c8 (diff)
downloadpfsense-762ed9137d9a03d77ad56e57488f862e26d3e2c7.zip
pfsense-762ed9137d9a03d77ad56e57488f862e26d3e2c7.tar.gz
Revise sorting to accommodate firewall logs name (logs)
Diffstat (limited to 'src/usr/local/www/index.php')
-rw-r--r--src/usr/local/www/index.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index 9ef6373..3d7a0d0 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -328,8 +328,13 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
<?php
// Build the Available Widgets table using a sorted copy of the $widgets array
+// Can't just ksort because the "Firewall Logs" widget has a key of "logs"
$available = $widgets;
-ksort($available);
+function widgetcompare($w1, $w2) {
+ return ($w1['name'] < $w2['name']) ? -1:1;
+}
+
+usort($available, 'widgetcompare');
foreach ($available as $widgetname => $widgetconfig):
if ($widgetconfig['display'] == 'none'):
OpenPOWER on IntegriCloud