Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: 20.x
- name: npm ci
run: npm ci
env:
Expand Down
24 changes: 21 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,36 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

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

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

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


## 1.5.0 - 2024.11.16 Nextcloud Hub 9
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"bamarni/composer-bin-plugin": "*"
},
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
"cs:check": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './tests/stubs/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm.phar --threads=1",
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline",
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function searchContacts(string $query = ''): DataResponse {
'URI' => $c['URI'],
'UID' => $c['UID'],
'BOOKID' => $c['addressbook-key'],
'READONLY' => $booksReadOnly[$c['addressbook-key']],
'READONLY' => $booksReadOnly[$c['addressbook-key']] ?? '',
'BOOKURI' => $addressBookUri,
'HAS_PHOTO' => (isset($c['PHOTO'])),
'HAS_PHOTO2' => (isset($c['PHOTO']) && $c['PHOTO'] !== ''),
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/FavoritesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public function addShareCategoryToMap(string $category, int $targetMapId, ?int $
}
$data = json_decode($file->getContent(), true);
foreach ($data as $s) {
if ($s->token = $share->token) {
if ($s->token === $share->token) {
return new DataResponse($this->l->t('Share was already on map'));
}
}
Expand Down
13 changes: 7 additions & 6 deletions lib/Service/AddressService.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ public function lookupAddress($adr, $uri): array {
// if it's still not in the DB, it means the lookup did not happen yet
// so we can schedule it for later
if (!$inDb) {
if (strlen($adr) > 255) {
$this->logger->notice('lookupAddress: Truncating $adr (entry too long) ' . $adr);
$adr = substr($adr, 0, 255);
}
$foo = $this->scheduleForLookup($adr, $uri);
$id = $foo[0];
$lat = $foo[1];
Expand Down Expand Up @@ -186,7 +190,7 @@ private function lookupAddressExternal($adr): array {
$query_adr = implode(', ', $splitted_adr);

$result_json = @file_get_contents(
'https://nominatim.openstreetmap.org/search.php?q=' . urlencode($query_adr) . '&format=json',
'https://nominatim.openstreetmap.org/search.php?q=' . urlencode($query_adr) . '&format=jsonv2',
false,
$context
);
Expand All @@ -198,12 +202,9 @@ private function lookupAddressExternal($adr): array {
$lat = null;
$lon = null;
foreach ($result as $addr) {
if (key_exists('lat', $addr) and
key_exists('lon', $addr)
) {
if (key_exists('lat', $addr) and key_exists('lon', $addr)) {
if (is_null($lat) or
(key_exists('class', $addr) and
($addr['class'] == 'building' or $addr['class'] == 'place'))) {
(key_exists('category', $addr) and in_array($addr['category'], ['place', 'building', 'amenity']))) {
$lat = $addr['lat'];
$lon = $addr['lon'];
}
Expand Down
Loading
Loading