diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-07-05 20:29:00 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-07-05 20:29:00 +0200 |
commit | ca6094f3900fd463449d9973589b1d49aed28b2a (patch) | |
tree | 89b404a60b20bd5bf6b02271e0a2c57a7c99fac7 /core/Controller/WhatsNewController.php | |
parent | 772bbd99bee83d17707c73a630a4d47c4b8bc807 (diff) | |
download | nextcloud-server-ca6094f3900fd463449d9973589b1d49aed28b2a.tar.gz nextcloud-server-ca6094f3900fd463449d9973589b1d49aed28b2a.zip |
wire the frontend
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/Controller/WhatsNewController.php')
-rw-r--r-- | core/Controller/WhatsNewController.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/Controller/WhatsNewController.php b/core/Controller/WhatsNewController.php index d3331651693..c3a6d28cea2 100644 --- a/core/Controller/WhatsNewController.php +++ b/core/Controller/WhatsNewController.php @@ -29,6 +29,7 @@ use OC\Updater\ChangesCheck; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; +use OCP\Defaults; use OCP\IConfig; use OCP\IRequest; use OCP\IUserManager; @@ -45,6 +46,8 @@ class WhatsNewController extends OCSController { private $whatsNewService; /** @var IFactory */ private $langFactory; + /** @var Defaults */ + private $defaults; public function __construct( string $appName, @@ -55,13 +58,15 @@ class WhatsNewController extends OCSController { Manager $keyManager, IConfig $config, ChangesCheck $whatsNewService, - IFactory $langFactory + IFactory $langFactory, + Defaults $defaults ) { parent::__construct($appName, $request, $capabilitiesManager, $userSession, $userManager, $keyManager); $this->config = $config; $this->userSession = $userSession; $this->whatsNewService = $whatsNewService; $this->langFactory = $langFactory; + $this->defaults = $defaults; } /** @@ -82,7 +87,11 @@ class WhatsNewController extends OCSController { try { $iterator = $this->langFactory->getLanguageIterator(); $whatsNew = $this->whatsNewService->getChangesForVersion($currentVersion); - $resultData = ['changelogURL' => $whatsNew['changelogURL']]; + $resultData = [ + 'changelogURL' => $whatsNew['changelogURL'], + 'product' => $this->defaults->getName(), + 'version' => $currentVersion, + ]; do { $lang = $iterator->current(); if(isset($whatsNew['whatsNew'][$lang])) { |