[BUGFIX] Improve method annotation and type hinting in FAL
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / Driver / DriverRegistry.php
index 6428579..5097e03 100644 (file)
@@ -4,7 +4,7 @@ namespace TYPO3\CMS\Core\Resource\Driver;
 /***************************************************************
  * Copyright notice
  *
- * (c) 2011 Andreas Wolf <andreas.wolf@ikt-werk.de>
+ * (c) 2011-2013 Andreas Wolf <andreas.wolf@ikt-werk.de>
  * All rights reserved
  *
  * This script is part of the TYPO3 project. The TYPO3 project is
@@ -97,12 +97,12 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                if (TYPO3_MODE !== 'BE') {
                        return;
                }
+               $driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
+               $configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
                foreach ($this->driverConfigurations as $driver) {
                        $label = $driver['label'] ?: $driver['class'];
-                       $driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
                        $driverFieldConfig['items'][] = array($label, $driver['shortName']);
                        if ($driver['flexFormDS']) {
-                               $configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
                                $configurationFieldConfig['ds'][$driver['shortName']] = $driver['flexFormDS'];
                        }
                }