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

github.com/nextcloud/maps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Hamann <git@arne.email>2022-06-07 16:32:22 +0300
committerArne Hamann <git@arne.email>2022-06-07 16:32:22 +0300
commit72d4e8147d063f0d3cfab3f4119f7ee2447dabbe (patch)
treec58828bb065fe212f9b28ad0f515542f3d3123e7 /appinfo
parent0de1d150ab71456cc9d8b15f5e4b444e576ca077 (diff)
parentf477d6d67836a142ecf538b966e6f0a47bd5720c (diff)
Merge branch 'master' into BootstrapBootstrap
Signed-off-by: Arne Hamann <git@arne.email>
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/application.php57
-rw-r--r--appinfo/info.xml2
-rw-r--r--appinfo/routes.php5
3 files changed, 61 insertions, 3 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
new file mode 100644
index 00000000..bd51f737
--- /dev/null
+++ b/appinfo/application.php
@@ -0,0 +1,57 @@
+<?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);
+ });
+ }
+
+}
diff --git a/appinfo/info.xml b/appinfo/info.xml
index e0484286..015a9081 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -33,7 +33,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/maps/master/screenshots/screenshot3.png</screenshot>
<dependencies>
<lib>exif</lib>
- <nextcloud min-version="20" max-version="24"/>
+ <nextcloud min-version="20" max-version="25"/>
<php min-version="7.3" max-version="8.0"/>
</dependencies>
<repair-steps>
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 8249eef3..e56dd8ca 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -16,9 +16,10 @@ return [
// utils
- ['name' => 'utils#getOptionsValues', 'url' => '/getOptionsValues', 'verb' => 'POST'],
+ ['name' => 'utils#getOptionsValues', 'url' => '/getOptionsValues', 'verb' => 'GET'],
['name' => 'utils#saveOptionValue', 'url' => '/saveOptionValue', 'verb' => 'POST'],
['name' => 'utils#setRoutingSettings', 'url' => '/setRoutingSettings', 'verb' => 'POST'],
+ ['name' => 'utils#getTrafficStyle', 'url' => '/style/traffic', 'verb' => 'GET'],
// photos
['name' => 'photos#getPhotosFromDb', 'url' => '/photos', 'verb' => 'GET'],
@@ -28,7 +29,7 @@ return [
// contacts
['name' => 'contacts#getContacts', 'url' => '/contacts', 'verb' => 'GET'],
- ['name' => 'contacts#getAllContacts', 'url' => '/contacts-all', 'verb' => 'GET'],
+ ['name' => 'contacts#searchContacts', 'url' => '/contacts-search', 'verb' => 'GET'],
['name' => 'contacts#placeContact', 'url' => '/contacts/{bookid}/{uri}', 'verb' => 'PUT'],
['name' => 'contacts#deleteContactAddress', 'url' => '/contacts/{bookid}/{uri}', 'verb' => 'DELETE'],
['name' => 'contacts#getContactLetterAvatar', 'url' => '/contacts-avatar', 'verb' => 'GET'],