From 711b06c6d33be46e585f7da54aac5a7f4df87c4d Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 3 Jan 2020 08:43:21 +0100 Subject: [PATCH 1/5] Do not apply options which value is null --- CHANGELOG.md | 10 +++++++++- src/Mapper/OptionsBuilder.php | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e538c1..dad1d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + + - Do not add options which value is `NULL` + ## [3.1.5] - 2019-08-26 ### Fixed @@ -130,7 +136,9 @@ Implemented enhancements - Bypass filesystem cache in debug mode - Changelog added -[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.4 +[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...hotfix/3.1.6 +[3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5 +[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.3...3.1.4 [3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3 [3.1.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1 [3.0.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4 diff --git a/src/Mapper/OptionsBuilder.php b/src/Mapper/OptionsBuilder.php index 4d46d3c..c3035db 100644 --- a/src/Mapper/OptionsBuilder.php +++ b/src/Mapper/OptionsBuilder.php @@ -210,6 +210,10 @@ class OptionsBuilder foreach ($options as $option => $mapping) { $default = static::getDefaultOption($option, $definition); + if ($model->$mapping === null) { + continue; + } + if ($model->$mapping === '1' || $model->$mapping === '') { if (((bool) $model->$mapping) !== $default) { static::applyOption($option, $model->$mapping, $definition); From a63c836535d48bd4d857684462eb656379803a08 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 3 Jan 2020 08:49:07 +0100 Subject: [PATCH 2/5] Fix labels (See #83) --- src/Bundle/Resources/contao/languages/de/tl_leaflet_layer.php | 4 ++-- src/Bundle/Resources/contao/languages/de/tl_leaflet_popup.php | 4 ++-- src/Bundle/Resources/contao/languages/de/tl_leaflet_style.php | 2 +- src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php | 2 +- src/Bundle/Resources/contao/languages/en/tl_leaflet_popup.php | 4 ++-- src/Bundle/Resources/contao/languages/en/tl_leaflet_style.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Bundle/Resources/contao/languages/de/tl_leaflet_layer.php b/src/Bundle/Resources/contao/languages/de/tl_leaflet_layer.php index 0815d93..41ac4a8 100644 --- a/src/Bundle/Resources/contao/languages/de/tl_leaflet_layer.php +++ b/src/Bundle/Resources/contao/languages/de/tl_leaflet_layer.php @@ -58,7 +58,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer']['1'] = 'Ba $GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['0'] = 'Cluster-Icon-Funktion erstellen'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['1'] = 'Diese Funktion wird zum Erstellen des Cluster-Icons benutzt.'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['0'] = 'Icons verwalten'; -$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Stile verwalten'; +$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Icon-Stile verwalten'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['0'] = 'Karten verwalten'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['1'] = 'Leaflet-Karten verwalten.'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster']['0'] = 'Marker-Cluster'; @@ -83,7 +83,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter']['1'] = 'Na $GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteinto']['1'] = 'In Layer %s einfügen'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['polygonOptions']['0'] = 'Polygon-Optionen'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['0'] = 'Popups verwalten'; -$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Popup-Icons verwalten'; +$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Marker Popups verwalten'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['0'] = 'Referenz'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['1'] = 'Wählen Sie den Referenzlayer aus. Ansonsten wird dasselbe JavaScript-Objekt benutzt.'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds']['0'] = 'Entfernen, wenn außerhalb der sichtbaren Begrenzung'; diff --git a/src/Bundle/Resources/contao/languages/de/tl_leaflet_popup.php b/src/Bundle/Resources/contao/languages/de/tl_leaflet_popup.php index e3f782b..a24868f 100644 --- a/src/Bundle/Resources/contao/languages/de/tl_leaflet_popup.php +++ b/src/Bundle/Resources/contao/languages/de/tl_leaflet_popup.php @@ -35,8 +35,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['0'] = 'Popup löschen $GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['1'] = 'Popup ID %s löschen'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['0'] = 'Popup bearbeiten'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['1'] = 'Popup ID %s bearbeiten'; -$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Popups verwalten'; -$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Popups verwalten'; +$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Icons verwalten'; +$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Icons verwalten'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['0'] = 'Im Sichtfeld behalten'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['1'] = 'Aktivieren Sie diese Einstellung um ein herausschieben des Popups aus dem sichbaren Bereich zu verhindern.'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn']['0'] = 'Layer verwalten'; diff --git a/src/Bundle/Resources/contao/languages/de/tl_leaflet_style.php b/src/Bundle/Resources/contao/languages/de/tl_leaflet_style.php index 4a771dc..c0010f3 100644 --- a/src/Bundle/Resources/contao/languages/de/tl_leaflet_style.php +++ b/src/Bundle/Resources/contao/languages/de/tl_leaflet_style.php @@ -44,7 +44,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['new']['1'] = 'Neuen Stil erstel $GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['0'] = 'Linientransparenz'; $GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['1'] = 'Die Transparenz des Striches kann einen Wert zwischen 0 und 1 annehmen.'; $GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['0'] = 'Popups verwalten'; -$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Icons verwalten'; +$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Stile verwalten'; $GLOBALS['TL_LANG']['tl_leaflet_style']['show']['0'] = 'Details anzeigen'; $GLOBALS['TL_LANG']['tl_leaflet_style']['show']['1'] = 'Details des Stils ID %s anzeigen'; $GLOBALS['TL_LANG']['tl_leaflet_style']['stroke']['0'] = 'Linie ziehen'; diff --git a/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php b/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php index 394e4f0..bfb75c8 100644 --- a/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php +++ b/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php @@ -21,7 +21,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][0] = 'Manage icons'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][1] = 'Manage marker icons'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][0] = 'Manage popups'; -$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups icons'; +$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups styles'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][0] = 'Manage styles'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][1] = 'Manage vector styles'; $GLOBALS['TL_LANG']['tl_leaflet_layer']['new'][0] = 'Create layer'; diff --git a/src/Bundle/Resources/contao/languages/en/tl_leaflet_popup.php b/src/Bundle/Resources/contao/languages/en/tl_leaflet_popup.php index a2bc878..4ff62f0 100644 --- a/src/Bundle/Resources/contao/languages/en/tl_leaflet_popup.php +++ b/src/Bundle/Resources/contao/languages/en/tl_leaflet_popup.php @@ -19,8 +19,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][0] = 'Manage layers'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][1] = 'Manage leaflet layers'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][0] = 'Manage styles'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][1] = 'Manage vector styles'; -$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage popups'; -$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker popups'; +$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage icons'; +$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker icons'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][0] = 'Create popup'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][1] = 'Create new popup'; $GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'][0] = 'Edit popup'; diff --git a/src/Bundle/Resources/contao/languages/en/tl_leaflet_style.php b/src/Bundle/Resources/contao/languages/en/tl_leaflet_style.php index d360310..1f5ef33 100644 --- a/src/Bundle/Resources/contao/languages/en/tl_leaflet_style.php +++ b/src/Bundle/Resources/contao/languages/en/tl_leaflet_style.php @@ -19,7 +19,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'][1] = 'Manage leaflet layers $GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][0] = 'Manage icons'; $GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][1] = 'Manage marker icons'; $GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][0] = 'Manage popups'; -$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups icons'; +$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups styles'; $GLOBALS['TL_LANG']['tl_leaflet_style']['new'][0] = 'Create style'; $GLOBALS['TL_LANG']['tl_leaflet_style']['new'][1] = 'Create new style'; $GLOBALS['TL_LANG']['tl_leaflet_style']['edit'][0] = 'Edit style'; From a4547ffb171d09b1ff3e00902680a35e6f216151 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 3 Jan 2020 08:53:47 +0100 Subject: [PATCH 3/5] Use relative icon path for the backend group icon (#83) --- CHANGELOG.md | 5 +++++ src/Bundle/Resources/public/css/backend_global.css | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dad1d34..9e7cb3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Use twig directly instead of templating component to restore Contao 4.8 + - Fix button labels ([#83](https://github.com/netzmacht/contao-leaflet-maps/issues/83)) + +### Changed + + - Use relative path for backend icon ([#82](https://github.com/netzmacht/contao-leaflet-maps/issues/82)) ## [3.1.4] - 2019-02-13 diff --git a/src/Bundle/Resources/public/css/backend_global.css b/src/Bundle/Resources/public/css/backend_global.css index ffc55e7..2c03bd8 100644 --- a/src/Bundle/Resources/public/css/backend_global.css +++ b/src/Bundle/Resources/public/css/backend_global.css @@ -1,6 +1,6 @@ #tl_navigation .tl_level_1_group .group-leaflet { - background: url(/bundles/netzmachtcontaoleaflet/img/leaflet.svg) 3px 2px no-repeat; + background: url(../img/leaflet.svg) 3px 2px no-repeat; } .tl_help_table a { From c0efdb058edf8cb7334ab5cdbf066d9a66a813fd Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 3 Jan 2020 09:08:52 +0100 Subject: [PATCH 4/5] Fix potential security issue --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3a29372..3ab278f 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "netzmacht/php-javascript-builder": "^1.0", "netzmacht/php-leaflet": "^1.1.0", "symfony/config": "~3.3 || ~4.0", - "symfony/dependency-injection": "~3.3 || ~4.0", + "symfony/dependency-injection": "^3.4.26 || ^4.1.12", "symfony/event-dispatcher": "~3.3 || ~4.0", "symfony/filesystem": "~3.3 || ~4.0", "symfony/http-kernel": "~3.3 || ~4.0", From 4795767a8bbfbee18f0994f3b1b78bed8a7a213c Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 3 Jan 2020 09:08:59 +0100 Subject: [PATCH 5/5] Prepare the release --- CHANGELOG.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e7cb3f..47692a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,21 +8,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.1.6] - 2020-01-03 + ### Fixed - Do not add options which value is `NULL` + - Fix button labels ([#83](https://github.com/netzmacht/contao-leaflet-maps/issues/83)) + - Fix potential security issue of symfony/dependency-injection (https://github.com/advisories/GHSA-pgwj-prpq-jpc2) + +### Changed + + - Use relative path for backend icon ([#82](https://github.com/netzmacht/contao-leaflet-maps/issues/82)) + ## [3.1.5] - 2019-08-26 ### Fixed - Use twig directly instead of templating component to restore Contao 4.8 - - Fix button labels ([#83](https://github.com/netzmacht/contao-leaflet-maps/issues/83)) -### Changed - - - Use relative path for backend icon ([#82](https://github.com/netzmacht/contao-leaflet-maps/issues/82)) - ## [3.1.4] - 2019-02-13 ### Fixed @@ -141,7 +145,8 @@ Implemented enhancements - Bypass filesystem cache in debug mode - Changelog added -[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...hotfix/3.1.6 +[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.6...hotfix/3.1.7 +[3.1.6]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...3.1.6 [3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5 [3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.3...3.1.4 [3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3