summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-22 17:26:15 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-22 17:26:15 +0100
commit8d7855ba14b0a9883793e2dbb8543558d6e63393 (patch)
tree96c73b3deac7c29c73cdd6f673deb011838bdc3b /lib
parentad7b7dfca116c0cffba97bb11e894ffde3c53090 (diff)
Use package.json version instead of info.xml
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PageController.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 9fc2b28e..d0274101 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -25,25 +25,17 @@ namespace OCA\Contacts\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IConfig;
use OCP\IRequest;
class PageController extends Controller {
protected $appName;
- /**
- * @var IConfig
- */
- private $config;
-
public function __construct(string $AppName,
- IRequest $request,
- IConfig $config) {
+ IRequest $request) {
parent::__construct($AppName, $request);
$this->appName = $AppName;
- $this->config = $config;
}
/**
@@ -53,20 +45,6 @@ class PageController extends Controller {
* Default routing
*/
public function index(): TemplateResponse {
- \OCP\Util::connectHook('\OCP\Config', 'js', $this, 'addJavaScriptVariablesForIndex');
return new TemplateResponse('contacts', 'main'); // templates/main.php
}
-
- /**
- * add parameters to javascript for user sites
- *
- * @param array $array
- */
- public function addJavaScriptVariablesForIndex(array $array) {
- $appversion = $this->config->getAppValue($this->appName, 'installed_version');
-
- $array['array']['oca_contacts'] = \json_encode([
- 'versionstring' => $appversion,
- ]);
- }
}