Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .babelrc.js

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: composer require --dev roave/security-advisories:dev-latest

- name: Install nextcloud/ocp
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-min }} --ignore-platform-reqs --with-dependencies

- name: Run coding standards check
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ node_modules/
jspm_packages/
vendor/
js/
css/

# Typescript v1 declaration files
typings/
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.4.16","version":"3.94.0","indent":"\t","lineEnding":"\n","rules":{"encoding":true,"full_opening_tag":true,"blank_line_after_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false},"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_function_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"modifier_keywords":{"elements":["method","property"]},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","do","else","elseif","final","for","foreach","function","if","interface","namespace","private","protected","public","static","switch","trait","try","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"align_multiline_comment":true,"array_indentation":true,"array_syntax":true,"binary_operator_spaces":{"default":"single_space"},"blank_line_after_opening_tag":true,"cast_spaces":{"space":"none"},"concat_space":{"spacing":"one"},"curly_braces_position":{"classes_opening_brace":"same_line","functions_opening_brace":"same_line"},"list_syntax":true,"lowercase_cast":true,"method_chaining_indentation":true,"no_leading_import_slash":true,"no_short_bool_cast":true,"no_spaces_inside_parenthesis":true,"no_unused_imports":true,"no_whitespace_in_blank_line":true,"nullable_type_declaration_for_default_null_value":true,"nullable_type_declaration":{"syntax":"question_mark"},"operator_linebreak":{"position":"beginning"},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"phpdoc_align":{"align":"left"},"phpdoc_single_line_var_spacing":true,"phpdoc_var_annotation_correct_order":true,"short_scalar_cast":true,"single_quote":{"strings_containing_single_quote_chars":false},"trailing_comma_in_multiline":{"elements":["parameters"]},"types_spaces":{"space":"none","space_multiple_catch":"none"},"type_declaration_spaces":{"elements":["function","property"]},"visibility_required":{"elements":["property","method","const"]},"yoda_style":{"equal":false,"identical":false,"less_and_greater":false},"PhpCsFixerCustomFixers\/multiline_promoted_properties":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"lib\/Listener\/CardCreatedListener.php":"b5cd1d0d4f23f95d0bc622d5e1b386fa","lib\/Listener\/CardDeletedListener.php":"02bdb93bbe7351acea4a2e81f88fd043","lib\/Listener\/CardUpdatedListener.php":"0112b63cbab83084282498224fc07089","lib\/Listener\/LoadAdditionalScriptsListener.php":"2c491128614d5d65c30a0a703577a913","lib\/Listener\/LoadSidebarListener.php":"6a063be71fb70cab935fc310f85f0da8","lib\/Migration\/InstallScan.php":"259ae0279092dd359c0dbd0f350a7827","lib\/Migration\/RegisterMimeType.php":"8573e4e53de2fc232d84a3b144bceba9","lib\/Migration\/UnregisterMimeType.php":"2e72417075220e89e03dd945abba547f","lib\/Migration\/Version000008Date20190428142257.php":"959de6252583f7ae9834937948acded1","lib\/Migration\/Version000009Date20190625000800.php":"28b39a1ee429f3f040e88966261af471","appinfo\/routes.php":"a38a0dc2d851b2ee912be660a0cfafdf","lib\/AppInfo\/Application.php":"b63698c49f97666a786836e7ab34bd96","lib\/BackgroundJob\/AddPhotoJob.php":"ce9b535301f31ab5c1b53b64382d85c6","lib\/BackgroundJob\/LaunchUsersInstallScanJob.php":"e80272554d2b5e9579ebcbf9c7ea4c77","lib\/BackgroundJob\/LookupMissingGeoJob.php":"d32365dcda492ee9be7c4218d47ee3a9","lib\/BackgroundJob\/UpdatePhotoByFileJob.php":"ff10d2ecfc60a2d2c9dbf09ba06fcae6","lib\/BackgroundJob\/UserInstallScanJob.php":"75a6d60d61da335faf6f103e0d56a399","lib\/Command\/RegisterMimetypes.php":"922d68817d99b90caa315efd08f23cd5","lib\/Command\/RescanPhotos.php":"22b4a3dd285f4ce0fb5302e65c6b6a61","lib\/Command\/RescanTracks.php":"75a6b25911e2129091223a87bfca1509","lib\/Migration\/Version000012Date20190703155323.php":"d7e7fca392dc6af69aa710babc5a6406","lib\/Migration\/Version000012Date20190722184716.php":"1b602a51b298cb0544a4130c31b03d4c","lib\/Migration\/Version000013Date20190723185417.php":"8273cc7edc6226a5bf67abec103a2c04","lib\/Migration\/Version000014Date20190817184844.php":"bda375fea6f233c0047eeeab4c0ca7c4","lib\/Migration\/Version000102Date20190901152326.php":"e487dcda7e6d6afb012d3db7afb5d2e6","lib\/Migration\/Version000106Date20191118221134.php":"450b39a3ff44479fbaaafeaba3eef3c7","lib\/Migration\/Version000107Date20200608220000.php":"d27416a5f5ec0d7b4293bdb6bbd9a0e6","lib\/Migration\/Version000108Date20230310220000.php":"f0f1cb89e0e5122288d6e1a584d2c9d2","lib\/Migration\/Version100100Date20230731135102.php":"96ba6906e43a6a29fd7cb8cf3d58fad4","lib\/Service\/GeophotoService.php":"825d8875d499ca81ae4f7393fae9374f","lib\/DB\/DeviceShareMapper.php":"4f962e7b5565e1ac53f28a251c0ff98b","lib\/DB\/FavoriteShare.php":"38231a9cb47baae78aef951c40c7349b","lib\/DB\/FavoriteShareMapper.php":"df2183301f5ec0314f9dec086ed2d700","lib\/DB\/Geophoto.php":"bd0cfd085e0c680bd6db7722a54c7817","lib\/DB\/GeophotoMapper.php":"b8f54fc82f2e25349088c53182dc9952","lib\/Helper\/ExifDataInvalidException.php":"9efbb4bbc044f8d8d97cc45b538657bb","lib\/Helper\/ExifDataNoLocationException.php":"a61d6abead520daab4e24e5380a42556","lib\/Helper\/functions.php":"3b47721dbe6a9a12fac175e7ac953e4e","lib\/Helper\/ExifGeoData.php":"b9c24368f8f66925f90b32910b41f745","lib\/Hooks\/FileHooks.php":"d43d1d9ba2ab7bb044b1984d9cfa426b","tests\/Unit\/Controller\/PageControllerTest.php":"26519465d9a8a1ab258cead043da68c3","tests\/Unit\/Controller\/PublicFavoritePageControllerTest.php":"b29dd05853e71378a6b163c3859ee19e","tests\/Unit\/Controller\/PublicFavoritesApiControllerTest.php":"109ff1fc43a4eecdb4f92cfc3c982b6e","tests\/Unit\/Controller\/PhotosControllerTest.php":"f6fb17919fbf90af2ff9c029945d930c","tests\/Unit\/Controller\/TracksControllerTest.php":"aab2668e70cf03f158e9604b66cd5ee1","tests\/Unit\/Helper\/ExifGeoDataTest.php":"8a5a7d882bdc0062666c28ae35bc8ca2","tests\/bootstrap.php":"0bde6cbc59d56cf43bf3988e6f9ea745","rector.php":"2c1ceca0f30f7a4e015f00d30be9aa81","lib\/Controller\/DevicesController.php":"de2c8125107415d1e510a9b1c5b3e50d","lib\/Controller\/MyMapsController.php":"8216b92d9648b94604d9954fa2cec330","lib\/Controller\/PageController.php":"4b3b28054ea5d99bbdb3ac518c497b95","lib\/Controller\/PhotosController.php":"73ad73089df418b1731dbd3ece71521e","lib\/Controller\/PublicContactsController.php":"f5a246b34b7a7ff45c1c94e0f2c5bcf4","lib\/Controller\/PublicFavoritePageController.php":"e0ced75bc921c9c74503a7bdcfb6c3ca","lib\/Controller\/PublicFavoritesApiController.php":"0329a39810847f419d0b345cf52eb29e","lib\/Controller\/PublicFavoritesController.php":"2961d99aa83b9ff7a7717a8ea0a7b695","lib\/Controller\/PublicPageController.php":"416222cf5d698561357129bc0aa1d027","lib\/Controller\/PublicTracksController.php":"bb1dab413d1208e235b9263e7170fdb3","templates\/public\/favorites_index.php":"12a65557899c6b4f010ec4162c53618b","templates\/public\/main.php":"2f16cfbab468ced3612803f091565388","templates\/settings\/index.php":"b58b7a7c42fc5d7f877ee5440608fd32","tests\/Integration\/Db\/FavoriteShareMapperTest.php":"5feb769d77f04cfe9373905d3cf23342","tests\/Integration\/AppTest.php":"dbdff49af36f6490294b262dbbf42a3c","tests\/Unit\/Controller\/ContactsControllerTest.php":"9649ee785ec912f41e2693600e72da48","tests\/Unit\/Controller\/DevicesApiControllerTest.php":"96cbb9ec6be6e44fbeda5cadd25e3327","tests\/Unit\/Controller\/DevicesControllerTest.php":"da0a356788d191eb223926a5e138a6af","tests\/Unit\/Controller\/FavoritesApiControllerTest.php":"3bcc326a14efee7290ada418575efd29","tests\/Unit\/Controller\/FavoritesControllerTest.php":"214644b0ce327b327c7ce891819f335f","lib\/Controller\/PublicUtilsController.php":"19696487e200096743198ddd45e72398","lib\/Controller\/RoutingController.php":"0ec2204a80a4d17859fbb8acba2ddd0b","lib\/Controller\/TracksController.php":"2d44caf9e736738201d55e854f74427a","lib\/Controller\/UtilsController.php":"85312ec3678c5a6c43f45656959d45af","lib\/Controller\/ContactsController.php":"b839425a263cc87730e9dc110e748458","lib\/Controller\/DevicesApiController.php":"3d77b513e6b2ac8725552503acdedbc7","lib\/Controller\/FavoritesApiController.php":"be9df13006546ba432c8e28942e00b60","lib\/Controller\/PublicPhotosController.php":"fb924cdfac53b4219adc9ad8a29b1ba0","lib\/Controller\/FavoritesController.php":"fb985eeb1eb6344acd8cbf8ba8fdb113","lib\/DB\/DeviceShare.php":"b8fef934d9bd09f8e143ad01c4c19d74","lib\/Service\/MimetypeService.php":"83809264418a5f3cfc65efa75b302955","lib\/Service\/MyMapsService.php":"94df95a752a73676c5337d421e4ceec8","lib\/Service\/PhotofilesService.php":"a1941c19d8642b011fd307aa01a730e5","lib\/Service\/TracksService.php":"24f0c55f56899cde108d21323f438941","lib\/Service\/AddressService.php":"2e85443abef934f6749eeb395f2df6f1","lib\/Service\/FavoritesService.php":"e8bd44feaf798a950b147fa5e67488b9","lib\/Service\/DevicesService.php":"6bed52664e9745d39d016eaa486c14ea","lib\/Settings\/AdminSettings.php":"5a6be9839001cafb2f5f2f05bf4fcbb9","templates\/adminSettings.php":"cfa252b5d3cdc8b390dc7b4246280b57","templates\/main.php":"609bf54cff53f307b4d85b2f7f7279a4"}}
11 changes: 0 additions & 11 deletions babel.config.js

This file was deleted.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"test:integration:dev": "phpunit -c tests/phpunit.integration.xml --no-coverage --order-by=defects --stop-on-defect --fail-on-warning --stop-on-error --stop-on-failure",
"test:unit": "phpunit -c tests/phpunit.unit.xml --fail-on-warning",
"test:unit:dev": "phpunit -c tests/phpunit.unit.xml --no-coverage --order-by=defects --stop-on-defect --fail-on-warning --stop-on-error --stop-on-failure",
"rector": "rector && composer cs:fix",
"post-install-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install --ansi"
],
Expand Down
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: CC0-1.0
*/

import { recommended } from '@nextcloud/eslint-config'

export default [
...recommended,
{
rules: {
'no-restricted-properties': [
'error',
{ property: 'substr', message: 'Use .slice instead of .substr.' },
],
'jsdoc/require-jsdoc': 'off',
'jsdoc/tag-lines': 'off',
'vue/first-attribute-linebreak': 'off',
},
},
]
1 change: 1 addition & 0 deletions img/elevation-pushpin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
28 changes: 8 additions & 20 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/**
* ownCloud - maps
*
Expand All @@ -9,7 +11,6 @@
* @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\DAV\Events\CardCreatedEvent;
Expand All @@ -23,15 +24,12 @@
use OCA\Maps\Listener\CardUpdatedListener;
use OCA\Maps\Listener\LoadAdditionalScriptsListener;
use OCA\Maps\Listener\LoadSidebarListener;
use OCA\Maps\Service\PhotofilesService;
use OCA\Maps\Service\TracksService;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\EmptyFeaturePolicy;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IServerContainer;
use OCP\Security\FeaturePolicy\AddFeaturePolicyEvent;

class Application extends App implements IBootstrap {
Expand Down Expand Up @@ -71,28 +69,18 @@ public function register(IRegistrationContext $context): void {
}

public function boot(IBootContext $context): void {
// ... boot logic goes here ...
$context->getAppContainer()->registerService('FileHooks', function ($c) {
return new FileHooks(
$c->query(IServerContainer::class)->getRootFolder(),
\OCP\Server::get(PhotofilesService::class),
\OCP\Server::get(TracksService::class),
$c->query('AppName'),
$c->query(IServerContainer::class)->getLockingProvider()
);
});

$context->getAppContainer()->query('FileHooks')->register();
$context->getAppContainer()->get(FileHooks::class)->register();

$this->registerFeaturePolicy();
}

private function registerFeaturePolicy() {
$dispatcher = $this->getContainer()->getServer()->get(IEventDispatcher::class);
private function registerFeaturePolicy(): void {
$dispatcher = $this->getContainer()->get(IEventDispatcher::class);

$dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e) {
$dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e): void {
$fp = new EmptyFeaturePolicy();
$fp->addAllowedGeoLocationDomain('\'self\'');
$fp->addAllowedGeoLocationDomain("'self'");

$e->addPolicy($fp);
});
}
Expand Down
Loading
Loading