[FOLLOWUP][TASK] Migrate to short array syntax 88/49788/2
authorDaniel Goerz <ervaude@gmail.com>
Fri, 2 Sep 2016 20:06:28 +0000 (22:06 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 2 Sep 2016 20:14:48 +0000 (22:14 +0200)
Restore desriptions of configuration options in
"All Configuration" in the install tool.

Change-Id: I9064056b4d982a28a18d72b560df1d995c3c70f7
Resolves: #77802
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/49788
Reviewed-by: Ralf Merz <info@merzilla.de>
Tested-by: Ralf Merz <info@merzilla.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php

index 0617607..998690f 100644 (file)
@@ -216,13 +216,13 @@ class AllConfiguration extends Action\AbstractAction
         foreach ($lines as $lc) {
             $lc = trim($lc);
             if ($in) {
-                if ($lc === ');') {
+                if ($lc === '];') {
                     $in = 0;
                 } else {
                     if (preg_match('/["\']([[:alnum:]_-]*)["\'][[:space:]]*=>(.*)/i', $lc, $reg)) {
                         preg_match('/,[\\t\\s]*\\/\\/(.*)/i', $reg[2], $creg);
                         $theComment = trim($creg[1]);
-                        if (substr(strtolower(trim($reg[2])), 0, 5) == 'array' && $reg[1] === strtoupper($reg[1])) {
+                        if (substr(trim($reg[2]), 0, 1) === '[' && $reg[1] === strtoupper($reg[1])) {
                             $mainKey = trim($reg[1]);
                         } elseif ($mainKey) {
                             $commentArray[$mainKey][$reg[1]] = $theComment;
@@ -230,7 +230,7 @@ class AllConfiguration extends Action\AbstractAction
                     }
                 }
             }
-            if ($lc === 'return array(') {
+            if ($lc === 'return [') {
                 $in = 1;
             }
         }