diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-20 14:24:17 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-20 16:19:50 -0200 |
commit | 2efc1ffdb403d289eecf81559ce9a71a15596a61 (patch) | |
tree | 8b9414995a943a77178f7602968ec88ea044907b /src/usr | |
parent | 0b84a5a64203e94ab988c0abac245f0d562c0ac0 (diff) | |
download | pfsense-2efc1ffdb403d289eecf81559ce9a71a15596a61.zip pfsense-2efc1ffdb403d289eecf81559ce9a71a15596a61.tar.gz |
Use inline function
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/pkg_mgr.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index ecc99e9..1c1505e 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -134,10 +134,6 @@ if($pkg_info) { display_top_tabs($tab_array); } -function compareName($a, $b) { - return(strcasecmp ($a['name'], $b['name'])); -} - if(!$pkg_info || !is_array($pkg_info)):?> <div class="alert alert-warning"> <?=gettext("There are currently no packages available for installation.")?> @@ -159,7 +155,9 @@ if(!$pkg_info || !is_array($pkg_info)):?> <?php // Sort case insensitve (so we get AbCdEf not ACEcdf) - usort($pkg_info, 'compareName'); + usort($pkg_info, function($a, $b) { + return(strcasecmp ($a['name'], $b['name'])); + }); foreach($pkg_info as $index): |