}
}
- private function getAllApps() {
- return $this->allApps;
- }
-
/**
* Get all available apps in a category
*
*/
public function listApps(): JSONResponse {
$this->fetchApps();
- $apps = $this->getAllApps();
+ $apps = $this->allApps;
$dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n);
$groups = json_decode($appData['groups']);
}
$appData['groups'] = $groups;
- $appData['canUnInstall'] = !$appData['active'] && $appData['removable'];
// fix licence vs license
if (isset($appData['license']) && !isset($appData['licence'])) {
$ignoreMax = in_array($appData['id'], $ignoreMaxApps);
- // analyse dependencies
+ // analyze dependencies
$missing = $dependencyAnalyzer->analyze($appData, $ignoreMax);
- $appData['canInstall'] = empty($missing);
$appData['missingDependencies'] = $missing;
-
- $appData['missingMinOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['min-version']);
- $appData['missingMaxOwnCloudVersion'] = !isset($appData['dependencies']['nextcloud']['@attributes']['max-version']);
$appData['isCompatible'] = $dependencyAnalyzer->isMarkedCompatible($appData);
+ $appData['isForceEnabled'] = $ignoreMax;
return $appData;
}, $apps);
'author' => $authors,
'shipped' => $this->appManager->isShipped($app['id']),
'version' => $currentVersion,
- 'default_enable' => '',
'types' => [],
'documentation' => [
'admin' => $app['adminDocs'],
],
'website' => $app['website'],
'bugs' => $app['issueTracker'],
- 'detailpage' => $app['website'],
'dependencies' => array_merge(
$nextCloudVersionDependencies,
$phpDependencies
),
'level' => ($app['isFeatured'] === true) ? 200 : 100,
- 'missingMaxOwnCloudVersion' => false,
- 'missingMinOwnCloudVersion' => false,
- 'canInstall' => true,
'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($app['screenshots'][0]['url']) : '',
'score' => $app['ratingOverall'],
'ratingRecent' => $app['ratingRecent'],
'active' => $this->appManager->isEnabledForUser($app['id']),
'needsDownload' => !$existsLocally,
'groups' => $groups,
- 'fromAppStore' => true,
'appstoreData' => $app,
];
}
$info['active'] = $active;
if ($appManager->isShipped($app)) {
- $info['internal'] = true;
+ $info['shipped'] = true;
$info['level'] = self::officialApp;
- $info['removable'] = false;
} else {
- $info['internal'] = false;
- $info['removable'] = true;
+ $info['shipped'] = false;
}
if (in_array($app, $supportedApps)) {