Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-03-26 22:39:48 +0300
committerRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-03-26 22:39:48 +0300
commit19a99d077c99e39571296b321dd397a476a47104 (patch)
tree180ee217713abd4a42c1dc760b0bea71545a5377 /lib
parenteb2d41dc4bbbf776a993ecaaf737b4534f76197c (diff)
Use webpack variables for app version
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PageController.php27
1 files changed, 1 insertions, 26 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index bb182be3..f9033bbf 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -26,7 +26,6 @@ use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCP\IRequest;
use \OCP\IUserSession;
-use \OCP\IConfig;
/**
* Controller class for main page.
@@ -39,20 +38,13 @@ class PageController extends Controller {
private $userSession;
/**
- * @var IConfig
- */
- private $config;
-
- /**
* @param string $appName
* @param IRequest $request an instance of the request
* @param IUserSession $userSession
- * @param IConfig $config
*/
- public function __construct(string $appName, IRequest $request, IUserSession $userSession, IConfig $config) {
+ public function __construct(string $appName, IRequest $request, IUserSession $userSession) {
parent::__construct($appName, $request);
$this->userSession = $userSession;
- $this->config = $config;
}
@@ -63,23 +55,6 @@ class PageController extends Controller {
* @return TemplateResponse
*/
public function index():TemplateResponse {
- \OCP\Util::connectHook('\OCP\Config', 'js', $this, 'addJavaScriptVariablesForIndex');
return new TemplateResponse('tasks', 'main');
}
-
- /**
- * Add parameters to javascript for user sites
- *
- * @param array $array
- */
- public function addJavaScriptVariablesForIndex(array $array) {
- $user = $this->userSession->getUser();
- if ($user === null) {
- return;
- }
- $appversion = $this->config->getAppValue($this->appName, 'installed_version');
- $array['array']['oca_tasks'] = \json_encode([
- 'versionstring' => $appversion,
- ]);
- }
}