diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-15 15:58:47 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-15 15:58:47 -0500 |
commit | 762ed9137d9a03d77ad56e57488f862e26d3e2c7 (patch) | |
tree | 669f84bce474d736ceb6ee13bdaec67a209b890e /src/usr/local/www/index.php | |
parent | ba23527b3449cdf5a192574b3a1aaf05c7fef8c8 (diff) | |
download | pfsense-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.php | 7 |
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'): |