Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2012-09-18 19:51:55 +0400
committerSam Tuke <samtuke@owncloud.com>2012-09-18 19:55:03 +0400
commit9df403f051354b24da61b12f6446d10d899f05f7 (patch)
treea05b04dacef9e78497a77945e28ce83f0e578be4 /settings/apps.php
parent842cd57fa780029e60d0fb8094d4dd794bb33cb7 (diff)
Added failsafes for retrieving remote apps on settings->apps page, in case categories or app data are not found
Diffstat (limited to 'settings/apps.php')
-rw-r--r--settings/apps.php44
1 files changed, 25 insertions, 19 deletions
diff --git a/settings/apps.php b/settings/apps.php
index 1481f6fc4ad..a1c1bf6aa53 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -31,10 +31,6 @@ OC_App::setActiveNavigationEntry( "core_apps" );
$installedApps = OC_App::getAllApps();
-$remoteApps = OC_App::getAppstoreApps();
-
-//$remoteApps = array();
-
//TODO which apps do we want to blacklist and how do we integrate blacklisting with the multi apps folder feature?
$blacklist = array('files');//we dont want to show configuration for these
@@ -90,29 +86,39 @@ foreach ( $installedApps as $app ) {
}
}
-// Remove duplicates
-foreach ( $appList as $app ) {
+$remoteApps = OC_App::getAppstoreApps();
- foreach ( $remoteApps AS $key => $remote ) {
-
- if (
- $app['name'] == $remote['name']
- // To set duplicate detection to use OCS ID instead of string name,
- // enable this code, remove the line of code above,
- // and add <ocs_id>[ID]</ocs_id> to info.xml of each 3rd party app:
- // OR $app['ocs_id'] == $remote['ocs_id']
- ) {
+if ( $remoteApps ) {
+
+ // Remove duplicates
+ foreach ( $appList as $app ) {
+
+ foreach ( $remoteApps AS $key => $remote ) {
+
+ if (
+ $app['name'] == $remote['name']
+ // To set duplicate detection to use OCS ID instead of string name,
+ // enable this code, remove the line of code above,
+ // and add <ocs_id>[ID]</ocs_id> to info.xml of each 3rd party app:
+ // OR $app['ocs_id'] == $remote['ocs_id']
+ ) {
+
+ unset( $remoteApps[$key]);
- unset( $remoteApps[$key]);
+ }
}
-
+
}
+
+ $combinedApps = array_merge( $appList, $remoteApps );
+
+} else {
+
+ $combinedApps = $appList;
}
-$combinedApps = array_merge( $appList, $remoteApps );
-
function app_sort( $a, $b ) {
if ($a['active'] != $b['active']) {