[TASK] Load defaultConfigArray just once in AllConfiguration 19/24419/2
authorSascha Egerer <sascha.egerer@dkd.de>
Sat, 5 Oct 2013 20:32:48 +0000 (22:32 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sat, 5 Oct 2013 20:41:00 +0000 (22:41 +0200)
Currently the method getDefaultConfigArrayComments is
called for every setting but should only be called once.
The method parses the whole defaultconfiguration file so
maybe this does speed up things a little bit.

Resolves: #52555
Releases: 6.2
Change-Id: I65d0151b200a657052691f52211f1e8edaf38019
Reviewed-on: https://review.typo3.org/24419
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php

index 9688b92..d11d992 100644 (file)
@@ -73,6 +73,7 @@ class AllConfiguration extends Action\AbstractAction implements Action\ActionInt
                $data = array();
                $typo3ConfVars = array_keys($GLOBALS['TYPO3_CONF_VARS']);
                sort($typo3ConfVars);
+               $commentArray = $this->getDefaultConfigArrayComments();
                foreach ($typo3ConfVars as $sectionName) {
                        $data[$sectionName] = array();
 
@@ -87,7 +88,6 @@ class AllConfiguration extends Action\AbstractAction implements Action\ActionInt
                                        $value = $potentialValue;
                                }
 
-                               $commentArray = $this->getDefaultConfigArrayComments();
                                $description = trim($commentArray[$sectionName][$key]);
                                $isTextarea = preg_match('/^(<.*?>)?string \\(textarea\\)/i', $description) ? TRUE : FALSE;
                                $doNotRender = preg_match('/^(<.*?>)?string \\(exclude\\)/i', $description) ? TRUE : FALSE;