[BUGFIX] Add simulatestatic to upgrade wizard
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 27 Nov 2012 03:31:59 +0000 (04:31 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 27 Nov 2012 03:56:42 +0000 (04:56 +0100)
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
typo3/sysext/install/Classes/CoreUpdates/InstallSysExtsUpdate.php

index 66a0807..bea4889 100644 (file)
@@ -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();