diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-31 17:08:11 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-10-31 17:17:47 +0100 |
commit | a68595742b4a5e13f27bc5cc9d4bbd79044e1790 (patch) | |
tree | c1bc8766390682596b6ec02fbcd9f70542d9db6f /settings/Controller | |
parent | 8acb54aa0b32a8b750f8ab3aba9f63aa931be7d1 (diff) | |
download | nextcloud-server-a68595742b4a5e13f27bc5cc9d4bbd79044e1790.tar.gz nextcloud-server-a68595742b4a5e13f27bc5cc9d4bbd79044e1790.zip |
Proxy images through usercontent.apps.nextcloud.com
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/AppSettingsController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php index 1222b6bc86d..8164dd1fcfa 100644 --- a/settings/Controller/AppSettingsController.php +++ b/settings/Controller/AppSettingsController.php @@ -113,7 +113,7 @@ class AppSettingsController extends Controller { $templateResponse = new TemplateResponse($this->appName, 'apps', $params, 'user'); $policy = new ContentSecurityPolicy(); - $policy->addAllowedImageDomain('*'); + $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); $templateResponse->setContentSecurityPolicy($policy); return $templateResponse; @@ -234,18 +234,19 @@ class AppSettingsController extends Controller { 'missingMaxOwnCloudVersion' => false, 'missingMinOwnCloudVersion' => false, 'canInstall' => true, - 'preview' => $app['screenshots'][0]['url'], + 'preview' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($app['screenshots'][0]['url']) : '', 'score' => $app['ratingOverall'], 'removable' => $existsLocally, 'active' => $this->appManager->isEnabledForUser($app['id']), 'needsDownload' => !$existsLocally, 'groups' => $groups, + 'fromAppStore' => true, ]; $appFetcher = \OC::$server->getAppFetcher(); $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $appFetcher); - if($newVersion) { + if($newVersion && $this->appManager->isInstalled($app['id'])) { $formattedApps[count($formattedApps)-1]['update'] = $newVersion; } } |