diff options
author | Phie <phie@phie.ovh> | 2019-04-26 19:39:46 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-04-26 19:39:46 +0300 |
commit | a5286ba8d1b694d177a71f7fa5dd56a678af2d6c (patch) | |
tree | 10dc716d50c3eb59c291f3231b79fb11d1d1f175 /appinfo | |
parent | 2df6a769a6975c13f0641c833960975ae9328ce6 (diff) |
now working with owncloudv0.15.3
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/app.php | 55 | ||||
-rwxr-xr-x | appinfo/info.xml | 4 | ||||
-rwxr-xr-x | appinfo/routes.php | 2 |
3 files changed, 38 insertions, 23 deletions
diff --git a/appinfo/app.php b/appinfo/app.php index 3d2ee0b..c9ff51d 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,25 +1,5 @@ <?php -/** - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Jan-Christoph Borchardt <hey@jancborchardt.net> - * @author Thomas Imbreckx <zinks@iozero.be> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * Mail - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ + namespace OCA\Carnet\AppInfo; use OCP\AppFramework\App; use OCA\Mail\HordeTranslationHandler; @@ -42,10 +22,43 @@ class Application extends App { return $c->query('ServerContainer')->getConfig(); }); + + $container->registerService('RootFolder', function($c) { + + return $c->query('ServerContainer')->getRootFolder(); + }); $container->registerService('UserManager', function($c) { return $c->query('ServerContainer')->getUserManager(); }); $this->connectWatcher($container); + + $appName = $container->query('AppName'); + $container->query('OCP\INavigationManager') + ->add( + function () use ($container, $appName) { + $urlGenerator = $container->query('OCP\IURLGenerator'); + + return [ + 'id' => $appName, + + // Sorting weight for the navigation. The higher the number, the higher + // will it be listed in the navigation + 'order' => 2, + + // The route that will be shown on startup when called from within the GUI + // Public links are using another route, see appinfo/routes.php + 'href' => $urlGenerator->linkToRoute($appName . '.page.index'), + + // The icon that will be shown in the navigation + // This file needs to exist in img/ + 'icon' => $urlGenerator->imagePath($appName, 'app.svg'), + + // The title of the application. This will be used in the + // navigation or on the settings page + 'name' => 'Carnet' + ]; + } + ); } private function connectWatcher(IAppContainer $container) { diff --git a/appinfo/info.xml b/appinfo/info.xml index c971dfe..5692f81 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -18,7 +18,7 @@ Mac, with sync capabilities - Statistics : words/sentences/characters - Sync with NextCloud - Online editor as a NextCloud App]]></description> - <version>0.15.2</version> + <version>0.15.3</version> <licence>agpl</licence> <author mail="phie@phie.ovh" >Phie</author> <namespace>Carnet</namespace> @@ -32,6 +32,8 @@ Mac, with sync capabilities </types> <dependencies> <nextcloud min-version="13" max-version="16"/> + <owncloud min-version="10" max-version="12"/> + </dependencies> <navigations> <navigation> diff --git a/appinfo/routes.php b/appinfo/routes.php index 2806ae6..2d9c35b 100755 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -9,7 +9,7 @@ */ $this->create('carnet_writer','/writer')->actionInclude('carnet/templates/writer.php'); - + return [ 'routes' => [ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], |