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:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-07-05 21:29:00 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-07-05 21:29:00 +0300
commitca6094f3900fd463449d9973589b1d49aed28b2a (patch)
tree89b404a60b20bd5bf6b02271e0a2c57a7c99fac7 /core/Controller
parent772bbd99bee83d17707c73a630a4d47c4b8bc807 (diff)
wire the frontend
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/WhatsNewController.php13
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])) {