]> source.dussan.org Git - nextcloud-server.git/commitdiff
Sort apps on name and enabled status
authorBart Visscher <bartv@thisnet.nl>
Wed, 7 Dec 2011 19:38:58 +0000 (20:38 +0100)
committerBart Visscher <bartv@thisnet.nl>
Wed, 7 Dec 2011 19:41:00 +0000 (20:41 +0100)
settings/apps.php

index 27b4c17f9e69b8d402d75d62612f4704f825e6bd..12a7bf772025b2e234325d084fd9596331c83aa4 100644 (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)){