summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-15 16:01:41 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-15 16:01:41 +0200
commitc08e85bf7029265037a0838f9a537bb8fa7e954f (patch)
treed75036a59beafd83eecf6ae41db9570cfc66fb1d /settings
parent6096568da9edd8ef322f700a521d1e243c713135 (diff)
downloadnextcloud-server-c08e85bf7029265037a0838f9a537bb8fa7e954f.tar.gz
nextcloud-server-c08e85bf7029265037a0838f9a537bb8fa7e954f.zip
dont throw errors if we cant connect to the apps repository
Diffstat (limited to 'settings')
-rw-r--r--settings/apps.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/settings/apps.php b/settings/apps.php
index e41a0cbf8dd..05da4259768 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -46,16 +46,19 @@ foreach($registeredApps as $app){
}
}
-$categories=array_keys(OC_OCSClient::getCategories());
-$externalApps=OC_OCSClient::getApplications($categories);
-foreach($externalApps as $app){
- $apps[]=array(
- 'name'=>$app['name'],
- 'id'=>$app['id'],
- 'active'=>false,
- 'description'=>$app['description'],
- 'author'=>$app['personid'],
- );
+$catagoryNames=OC_OCSClient::getCategories();
+if(is_array($catagoryNames)){
+ $categories=array_keys($catagoryNames);
+ $externalApps=OC_OCSClient::getApplications($categories);
+ foreach($externalApps as $app){
+ $apps[]=array(
+ 'name'=>$app['name'],
+ 'id'=>$app['id'],
+ 'active'=>false,
+ 'description'=>$app['description'],
+ 'author'=>$app['personid'],
+ );
+ }
}