diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e538c1..47692a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,27 @@ 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] + +## [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 - + ## [3.1.4] - 2019-02-13 ### Fixed @@ -130,7 +145,10 @@ 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.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 [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/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", 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'; 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 { 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);