diff options
author | Arne Hamann <git@arne.email> | 2022-06-14 12:23:09 +0300 |
---|---|---|
committer | Arne Hamann <git@arne.email> | 2022-06-14 12:23:09 +0300 |
commit | d51d06396b6108384303f838b23765a62d10af1c (patch) | |
tree | 41cadaf4e87246c42a1f54e719e36daf634d9da4 /appinfo | |
parent | f3d625665c3f87b6dcee6a04e1f68eddd7a65d84 (diff) |
Removed appinfo/application.php
Signed-off-by: Arne Hamann <git@arne.email>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/application.php | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/appinfo/application.php b/appinfo/application.php deleted file mode 100644 index bd51f737..00000000 --- a/appinfo/application.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * ownCloud - maps - * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. - * - * @author Sander Brand <brantje@gmail.com>, Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com> - * @copyright Sander Brand 2014, Vinzenz Rosenkranz 2016, 2017 - */ - -namespace OCA\Maps\AppInfo; - - -use OCA\Maps\DB\FavoriteShareMapper; -use \OCP\AppFramework\App; -use \OCP\IServerContainer; -use OCA\Maps\Hooks\FileHooks; -use OCA\Maps\Service\PhotofilesService; -use OCA\Maps\Service\TracksService; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; - - -class Application extends App { - public function __construct (array $urlParams=array()) { - parent::__construct('maps', $urlParams); - - $container = $this->getContainer(); - - $this->getContainer()->registerService('FileHooks', function($c) { - return new FileHooks( - $c->query(IServerContainer::class)->getRootFolder(), - \OC::$server->query(PhotofilesService::class), - \OC::$server->query(TracksService::class), - $c->query(IServerContainer::class)->getLogger(), - $c->query('AppName'), - $c->query(IServerContainer::class)->getLockingProvider() - ); - }); - - $this->getContainer()->query('FileHooks')->register(); - - $this->registerFeaturePolicy(); - } - - private function registerFeaturePolicy() { - /** @var EventDispatcherInterface $dispatcher */ - $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); - - $dispatcher->addListener('OCP\Security\FeaturePolicy\AddFeaturePolicyEvent', function (\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent $e) { - $fp = new \OCP\AppFramework\Http\EmptyFeaturePolicy(); - $fp->addAllowedGeoLocationDomain('\'self\''); - $e->addPolicy($fp); - }); - } - -} |