Not all apps are from the appstore

Fixes #10504

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-08-02 12:56:23 +02:00
parent 94c35d542f
commit 106ce3368d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 5 additions and 3 deletions

View File

@ -251,9 +251,11 @@ class AppSettingsController extends Controller {
// Extend existing app details
$apps = array_map(function($appData) use ($dependencyAnalyzer) {
$appstoreData = $appData['appstoreData'];
$appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($appstoreData['screenshots'][0]['url']) : '';
$appData['category'] = $appstoreData['categories'];
if (isset($appData['appstoreData'])) {
$appstoreData = $appData['appstoreData'];
$appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($appstoreData['screenshots'][0]['url']) : '';
$appData['category'] = $appstoreData['categories'];
}
$newVersion = $this->installer->isUpdateAvailable($appData['id']);
if($newVersion && $this->appManager->isInstalled($appData['id'])) {