Skip to content

Commit

Permalink
Merge pull request #305 from jweiland-net/repairOsmUpgradeWizard
Browse files Browse the repository at this point in the history
Repair osm upgrade wizard
  • Loading branch information
sfroemkenjw authored Nov 20, 2023
2 parents 4cf56c9 + 4ca9aaf commit a545788
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
21 changes: 19 additions & 2 deletions Classes/Update/NewGeocodeUriForOsmUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;

Expand Down Expand Up @@ -57,9 +58,20 @@ public function executeUpdate(): bool
is_array($maps2ExtensionConfiguration)
&& array_key_exists('openStreetMapGeocodeUri', $maps2ExtensionConfiguration)
) {
$maps2ExtensionConfiguration['openStreetMapGeocodeUri'] = $this->newOsmGeocodeUri;
if (version_compare($this->getTypo3Version()->getBranch(), '11.0', '>=')) {
$maps2ExtensionConfiguration['openStreetMapGeocodeUri'] = $this->newOsmGeocodeUri;
$this->getExtensionConfiguration()->set(
'maps2',
$maps2ExtensionConfiguration
);
} else {
$this->getExtensionConfiguration()->set(
'maps2',
'openStreetMapGeocodeUri',
$this->newOsmGeocodeUri
);
}
}
$this->getExtensionConfiguration()->set('maps2', $maps2ExtensionConfiguration);

return true;
} catch (ExtensionConfigurationExtensionNotConfiguredException | ExtensionConfigurationPathDoesNotExistException $e) {
Expand All @@ -83,6 +95,11 @@ private function getExtensionConfiguration(): ExtensionConfiguration
return GeneralUtility::makeInstance(ExtensionConfiguration::class);
}

private function getTypo3Version(): Typo3Version
{
return GeneralUtility::makeInstance(Typo3Version::class);
}

public function getPrerequisites(): array
{
return [];
Expand Down
5 changes: 5 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
ChangeLog
=========

Version 10.0.10
===============

* BUGFIX: Repair OSM UpgradeWizard for TYPO3 10

Version 10.0.9
==============

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

project = maps2 (Maps2)
version = 10.0
release = 10.0.9
release = 10.0.10
t3author = Stefan Froemken
copyright = since 2013 by jweiland.net

Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$EM_CONF[$_EXTKEY] = [
'title' => 'Maps2',
'description' => 'Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap',
'version' => '10.0.9',
'version' => '10.0.10',
'category' => 'plugin',
'state' => 'stable',
'clearCacheOnLoad' => true,
Expand Down

0 comments on commit a545788

Please sign in to comment.