Sort apps on name and enabled status

This commit is contained in:
Bart Visscher 2011-12-07 20:38:58 +01:00
parent 0342b5fc43
commit 9ba59aee36

View file

@ -43,6 +43,14 @@ foreach($registeredApps as $app){
}
}
function app_sort($a, $b){
if ($a['active'] != $b['active']){
return $b['active'] - $a['active'];
}
return strcmp($a['name'], $b['name']);
}
usort($apps, 'app_sort');
// dissabled for now
// $catagoryNames=OC_OCSClient::getCategories();
// if(is_array($catagoryNames)){