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

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-01-09 17:27:18 +0300
committerLukas Reschke <lukas@owncloud.com>2015-01-09 17:30:16 +0300
commit5a94e711f53e31d0716d9b636bbbcda6aa8a4fca (patch)
tree9c89b40d7c01abc795e3e426f3fdd6ef970f2dff /appinfo
parenta7af3d33c1544d2398a242b3bbe1d406a91c59bd (diff)
Get rid of application.php
With 8.0 dependencies are automatically resolved
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/app.php4
-rw-r--r--appinfo/application.php48
-rw-r--r--appinfo/routes.php5
3 files changed, 3 insertions, 54 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index addf4a3..97d7735 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -12,6 +12,4 @@ namespace OCA\Files_PdfViewer\AppInfo;
use OCP\Util;
-$application = new Application();
-
-Util::addScript($application->getContainer()->getAppName(), 'previewplugin');
+Util::addScript('files_pdfviewer', 'previewplugin');
diff --git a/appinfo/application.php b/appinfo/application.php
deleted file mode 100644
index 10762f7..0000000
--- a/appinfo/application.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * @author Lukas Reschke
- * @copyright 2014 Lukas Reschke lukas@owncloud.com
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-namespace OCA\Files_PdfViewer\AppInfo;
-
-use OCA\Files_PdfViewer\Controller\DisplayController;
-use OCP\AppFramework\App;
-use OCP\IContainer;
-
-class Application extends App {
-
- /**
- * @param array $urlParams
- */
- public function __construct (array $urlParams=[]) {
- parent::__construct('files_pdfviewer', $urlParams);
-
- $container = $this->getContainer();
-
- /**
- * Controllers
- */
- $container->registerService('DisplayController', function(IContainer $c) {
- return new DisplayController(
- $c->query('AppName'),
- $c->query('Request'),
- $c->query('URLGenerator')
- );
- });
-
- /**
- * Core Services
- */
- $container->registerService('URLGenerator', function(IContainer $c) {
- return $c->query('ServerContainer')->getURLGenerator();
- });
-
- }
-
-
-}
diff --git a/appinfo/routes.php b/appinfo/routes.php
index f5871bf..232f495 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -10,7 +10,6 @@
namespace OCA\Files_PdfViewer\AppInfo;
-$application = new Application();
-$application->registerRoutes($this, ['routes' => [
+return ['routes' => [
['name' => 'display#showPdfViewer', 'url' => '/', 'verb' => 'GET'],
-]]); \ No newline at end of file
+]];