From 51b482de6da960e0f439a7f9aa530b4dbcec87ff Mon Sep 17 00:00:00 2001 From: Helmut Hummel <helmut.hummel@typo3.org> Date: Tue, 27 Nov 2012 04:31:59 +0100 Subject: [PATCH] [BUGFIX] Add simulatestatic to upgrade wizard The upgrade wizard should install the extension simulatestatic, which is now available in the TER and not part of the core any more. At the same time remove the dependency to the TER frontend extension on typo3.org and instead hardcode the version number in the ugrade wizard. Fixes: #43324 Releases: 6.0 Change-Id: Idaf87bb7ae34b4179b489e081480d71208fb3cfa Reviewed-on: http://review.typo3.org/16778 Reviewed-by: Nicole Cordes Tested-by: Nicole Cordes Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel --- .../CoreUpdates/InstallSysExtsUpdate.php | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/typo3/sysext/install/Classes/CoreUpdates/InstallSysExtsUpdate.php b/typo3/sysext/install/Classes/CoreUpdates/InstallSysExtsUpdate.php index 66a0807b043a..bea488934ed8 100644 --- a/typo3/sysext/install/Classes/CoreUpdates/InstallSysExtsUpdate.php +++ b/typo3/sysext/install/Classes/CoreUpdates/InstallSysExtsUpdate.php @@ -58,6 +58,18 @@ class InstallSysExtsUpdate extends \TYPO3\CMS\Install\Updates\AbstractUpdate { 't3editor', 'reports', 'scheduler', + 'simulatestatic', + ); + + /** + * @var array + */ + protected $extensionDetails = array( + 'simulatestatic' => array( + 'title' => 'Simulate Static URLs', + 'description' => 'Adds the possibility to have Speaking URLs in the TYPO3 Frontend pages.', + 'versionString' => '2.0.0', + ), ); /** @@ -200,6 +212,11 @@ class InstallSysExtsUpdate extends \TYPO3\CMS\Install\Updates\AbstractUpdate { foreach ($extensionKeys as $extensionKey) { if (!is_array($availableAndInstalledExtensions[$extensionKey])) { $extensionDetails = $this->getExtensionDetails($extensionKey); + if (empty($extensionDetails)) { + $this->updateSuccessful = FALSE; + $customMessages .= 'No version information for extension ' . $extensionKey . '. Cannot install it.'; + continue; + } $t3xContent = $this->fetchExtension($extensionKey, $extensionDetails['versionString']); if (empty($t3xContent)) { $this->updateSuccessful = FALSE; @@ -233,11 +250,8 @@ class InstallSysExtsUpdate extends \TYPO3\CMS\Install\Updates\AbstractUpdate { return reset($EM_CONF); } - // Repository extension - $url = str_replace('@extensionKey', $extensionKey, $this->informationUrl); - $jsonResponse = $this->fetchUrl($url); - if (!empty($jsonResponse) && is_string($jsonResponse)) { - return json_decode($jsonResponse, TRUE); + if (array_key_exists($extensionKey, $this->extensionDetails)) { + return $this->extensionDetails[$extensionKey]; } return array(); -- GitLab