With Nextcloud 28 the `OC.dialogs` API was deprecated,
instead we need to use `@nextcloud/dialogs` for the filepicker.
So this fixes:
1. The deprecated `OC.dialogs` usage
2. Bug where both dialogs where opened at the same time (file and folder
picker).
3. Properly place photos on other than the default map
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
A CSP entry for https://tile.openstreetmap.org was introduced in
8e9e960ac7, but it was only added
to the PageController but it should be added to all the places
where the CSP headers are generated.
Signed-off-by: chefe <hi@chefe.io>
Rather than having to remember to reset the query builder in each method
that uses it, these are now created on-demand from the db connection.
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
So far, we only allowed subdomains, but when I rolled out the other
changes, this was missing from having a working map with OSM tiles.
This is probably not related to the other changes (it worked fine a few
days ago, perhaps something was just changed within OSM), but I figured
it's still worth fixing.
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
Closes#1333
I decided to not cross-check the availability of all all deprecated
things with older majors, so both min and max version are v30 for now.
A list of all things that I've fixed:
* Deprecated SCSS variables updated as documented in the upgrade notes[1].
* Fixed a bunch of query builder deprecations:
* $qb->resetQueryParts() is deprecated, one should just create a new
query-builder object. Done that.
* Calling `$qb->expr()->andX()` (and `orX()`) with no arguments is
deprecated. Instead, one should list all arguments in an array and
pass that to the method. Reworked queries where necessary to do so.
* The PHPUnit version I got by running `make test` downloaded a version
that prohibits non-static data providers. Made all affected data
providers static.
With that, everything from `make test` passes in a local dev
installation of Nextcloud 30 except for two tests:
1) OCA\Maps\Controller\PhotosControllerTest::testAddGetPhotos
Failed asserting that actual size 0 matches expected size 1.
/home/ma27/Projects/nextcloud/apps/maps/tests/Unit/Controller/PhotosControllerTest.php:206
2) OCA\Maps\Controller\TracksControllerTest::testAddGetTracks
Failed asserting that false matches expected true.
/home/ma27/Projects/nextcloud/apps/maps/tests/Unit/Controller/TracksControllerTest.php:205
Both tests failed on the previous commit already, so I decided to leave
those for now.
[1] https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_30.html#front-end-changes
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>