Skip to content

Commit 8e1a006

Browse files
authored
Merge pull request #1431 from nextcloud/v1.6.0-Nextcloud-31
V1.6.0 nextcloud 31
2 parents bfdca1e + 57b2666 commit 8e1a006

35 files changed

+10573
-11696
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Set up Node
6464
uses: actions/setup-node@v3
6565
with:
66-
node-version: 12.x
66+
node-version: 20.x
6767
- name: npm ci
6868
run: npm ci
6969
env:

CHANGELOG.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,36 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7-
## 1.6.0 - [Unreleased] Nextcloud Hub 10
7+
## 1.6.0 - [unreleased] Nextcloud Hub 10
88
### Added
9+
- Support PHP 8.4 & NC31
10+
- Switch to (default) Nominatim request-format jsonv2.
11+
[21ab2f0](https://github.com/nextcloud/maps/commit/21ab2f08c1d5140aa3f3c9a3823d036a16b5eff7) @umgfoin
12+
- Cleanup bootstrap.php to be forward-compatible [#1418](https://github.com/nextcloud/maps/pull/1418) @come-nc
913
- Scan photos of specific directory [#1231](https://github.com/nextcloud/maps/pull/1231) @tetebueno
1014

1115
### Fixed
16+
- Non-recoverable exception during lookup of long or malformed addressbook entries
17+
[8df2e21](https://github.com/nextcloud/maps/commit/8df2e21eef28a9842f58566d9deb7313c56e8600) @umgfoin
18+
- Fix favorite category linking bug [6cb5a99](https://github.com/nextcloud/maps/commit/6cb5a998a550c24674a74c5eae380de0349e9f4a),
19+
[#1430](https://github.com/nextcloud/maps/pull/1430) @tacruc, @copilot
20+
- Broken filehooks for adding new geophotos and tracks to maps
21+
[#1420](https://github.com/nextcloud/maps/pull/1420) @umgfoin
22+
- Incorrect closure declaration for manual geo-photos rescan-command
23+
[#1419](https://github.com/nextcloud/maps/pull/1419) @umgfoin
1224
- Georeferenced photos from external folders not shown on map
1325
[#1371](https://github.com/nextcloud/maps/issues/1371) @umgfoin
14-
- Fix wrong failure-msg. when clearing photo-cache
26+
- Wrong failure-msg. when clearing photo-cache
1527
[#1375](https://github.com/nextcloud/maps/pull/1375) @umgfoin
28+
- Tiles not working on public pages because of missing CSP entries
29+
[#1363](https://github.com/nextcloud/maps/pull/1363) @chefe
1630

1731
### Updated
18-
- Update Dependencies and Nextcloud Requirement [#1402](https://github.com/nextcloud/maps/pull/1402) @a4blue
32+
- Update Dependencies and Nextcloud Requirements
33+
[fecd43c](https://github.com/nextcloud/maps/commit/fecd43cf146394fd524c7f5f9a0cfbc13cc3d4a2), [f601d2d](https://github.com/nextcloud/maps/commit/f601d2d267dc0fa9930d8e37baa528752510bc4c) @um
34+
gfoin
35+
- ci: update node.yml workflow from template [#1423](https://github.com/nextcloud/maps/pull/1423) @tacruc
36+
- Update Dependencies and Nextcloud Requirement [#1402](https://github.com/nextcloud/maps/pull/1402) @a4blue
1937

2038

2139
## 1.5.0 - 2024.11.16 Nextcloud Hub 9

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"bamarni/composer-bin-plugin": "*"
99
},
1010
"scripts": {
11-
"cs:fix": "php-cs-fixer fix",
12-
"cs:check": "php-cs-fixer fix --dry-run --diff",
11+
"cs:fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
12+
"cs:check": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff",
1313
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './tests/stubs/*' -print0 | xargs -0 -n1 php -l",
1414
"psalm": "psalm.phar --threads=1",
1515
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline",

lib/Controller/ContactsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public function searchContacts(string $query = ''): DataResponse {
413413
'URI' => $c['URI'],
414414
'UID' => $c['UID'],
415415
'BOOKID' => $c['addressbook-key'],
416-
'READONLY' => $booksReadOnly[$c['addressbook-key']],
416+
'READONLY' => $booksReadOnly[$c['addressbook-key']] ?? '',
417417
'BOOKURI' => $addressBookUri,
418418
'HAS_PHOTO' => (isset($c['PHOTO'])),
419419
'HAS_PHOTO2' => (isset($c['PHOTO']) && $c['PHOTO'] !== ''),

lib/Controller/FavoritesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ public function addShareCategoryToMap(string $category, int $targetMapId, ?int $
412412
}
413413
$data = json_decode($file->getContent(), true);
414414
foreach ($data as $s) {
415-
if ($s->token = $share->token) {
415+
if ($s->token === $share->token) {
416416
return new DataResponse($this->l->t('Share was already on map'));
417417
}
418418
}

lib/Service/AddressService.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ public function lookupAddress($adr, $uri): array {
113113
// if it's still not in the DB, it means the lookup did not happen yet
114114
// so we can schedule it for later
115115
if (!$inDb) {
116+
if (strlen($adr) > 255) {
117+
$this->logger->notice('lookupAddress: Truncating $adr (entry too long) ' . $adr);
118+
$adr = substr($adr, 0, 255);
119+
}
116120
$foo = $this->scheduleForLookup($adr, $uri);
117121
$id = $foo[0];
118122
$lat = $foo[1];
@@ -186,7 +190,7 @@ private function lookupAddressExternal($adr): array {
186190
$query_adr = implode(', ', $splitted_adr);
187191

188192
$result_json = @file_get_contents(
189-
'https://nominatim.openstreetmap.org/search.php?q=' . urlencode($query_adr) . '&format=json',
193+
'https://nominatim.openstreetmap.org/search.php?q=' . urlencode($query_adr) . '&format=jsonv2',
190194
false,
191195
$context
192196
);
@@ -198,12 +202,9 @@ private function lookupAddressExternal($adr): array {
198202
$lat = null;
199203
$lon = null;
200204
foreach ($result as $addr) {
201-
if (key_exists('lat', $addr) and
202-
key_exists('lon', $addr)
203-
) {
205+
if (key_exists('lat', $addr) and key_exists('lon', $addr)) {
204206
if (is_null($lat) or
205-
(key_exists('class', $addr) and
206-
($addr['class'] == 'building' or $addr['class'] == 'place'))) {
207+
(key_exists('category', $addr) and in_array($addr['category'], ['place', 'building', 'amenity']))) {
207208
$lat = $addr['lat'];
208209
$lon = $addr['lon'];
209210
}

0 commit comments

Comments
 (0)