[TASK] CGL, switch(): Indent "case" correctly; no "break" in default 48/21748/4
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 6 Jul 2013 10:24:42 +0000 (12:24 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 6 Jul 2013 13:19:46 +0000 (15:19 +0200)
* "case" needs to be indented one level more than switch().
* default-case should not have a break-statement

Change-Id: I8215ba2bdb19b9abbfe6ed45af3905d7e6c688d6
Resolves: #49527
Releases: 6.2
Reviewed-on: https://review.typo3.org/21748
Reviewed-by: Markus Klein
Tested-by: Markus Klein
122 files changed:
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Controller/Wizard/FormsController.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Toolbar/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Cache/CacheManager.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Collection/RecordCollectionRepository.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/Controller/CommandLineController.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/DatabaseConnection.php
typo3/sysext/core/Classes/Database/PreparedStatement.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Database/SqlParser.php
typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Http/AjaxRequestHandler.php
typo3/sysext/core/Classes/Http/Observer/Download.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Locking/Locker.php
typo3/sysext/core/Classes/Mail/Rfc822AddressesParser.php
typo3/sysext/core/Classes/Mail/SwiftMailerAdapter.php
typo3/sysext/core/Classes/Messaging/FlashMessageQueue.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/VersionNumberUtility.php
typo3/sysext/dbal/Classes/Controller/ModuleController.php
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/dbal/Classes/Database/SqlParser.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/PropertyType.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPullParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPushParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPullParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPushParser.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php
typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FormContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ImageTextContentObject.php
typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Hooks/TreelistCacheUpdateHooks.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/Page/FramesetRenderer.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Controller/ModuleController.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Example/CrawlerHook.php
typo3/sysext/indexed_search/Classes/FileContentParser.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Hook/MysqlFulltextIndexHook.php
typo3/sysext/indexed_search/Classes/Utility/DoubleMetaPhoneUtility.php
typo3/sysext/info_pagetsconfig/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/install/Classes/CoreUpdates/MediaFlexformUpdate.php
typo3/sysext/install/Classes/Report/InstallStatusReport.php
typo3/sysext/linkvalidator/Classes/Linktype/LinkHandler.php
typo3/sysext/lowlevel/Classes/AdminCommand.php
typo3/sysext/lowlevel/Classes/CleanerCommand.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/perm/Classes/Controller/PermissionAjaxController.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/Controller/ElementBrowserController.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php
typo3/sysext/reports/Classes/Report/Status/SystemStatus.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Classes/Controller/SpellCheckingController.php
typo3/sysext/rtehtmlarea/Classes/Extension/MicroDataSchema.php
typo3/sysext/rtehtmlarea/Classes/Hook/SoftReferenceHook.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/rtehtmlarea/Classes/SelectImage.php
typo3/sysext/rtehtmlarea/Classes/User.php
typo3/sysext/saltedpasswords/Classes/Autoloader.php
typo3/sysext/saltedpasswords/Classes/Utility/ExtensionManagerConfigurationUtility.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php
typo3/sysext/sv/Classes/AuthenticationService.php
typo3/sysext/sv/Classes/LoginFormHook.php
typo3/sysext/t3editor/Classes/Hook/TypoScriptTemplateInfoHook.php
typo3/sysext/t3editor/Classes/T3Editor.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index b00ac3c..4853486 100644 (file)
@@ -1254,7 +1254,6 @@ class ClickMenu {
                                                                        $pointer = count($menuItems);
                                                                }
                                                                $found = TRUE;
-                                                               break;
                                                }
                                        }
                                        if ($found) {
index 0db9745..4ea46a1 100644 (file)
@@ -796,7 +796,6 @@ class FormsController {
                                                        break;
                                                default:
                                                        $confData['default'] = trim($parts[2]);
-                                                       break;
                                        }
                                        // Field configuration depending on the fields type:
                                        switch ((string) $confData['type']) {
index 7ff58e9..ded376b 100644 (file)
@@ -304,18 +304,18 @@ class DataPreprocessor {
         */
        public function renderRecord_SW($data, $fieldConfig, $TSconfig, $table, $row, $field) {
                switch ((string) $fieldConfig['config']['type']) {
-               case 'group':
-                       $data = $this->renderRecord_groupProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
-                       break;
-               case 'select':
-                       $data = $this->renderRecord_selectProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
-                       break;
-               case 'flex':
-                       $data = $this->renderRecord_flexProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
-                       break;
-               case 'inline':
-                       $data = $this->renderRecord_inlineProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
-                       break;
+                       case 'group':
+                               $data = $this->renderRecord_groupProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
+                               break;
+                       case 'select':
+                               $data = $this->renderRecord_selectProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
+                               break;
+                       case 'flex':
+                               $data = $this->renderRecord_flexProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
+                               break;
+                       case 'inline':
+                               $data = $this->renderRecord_inlineProc($data, $fieldConfig, $TSconfig, $table, $row, $field);
+                               break;
                }
                return $data;
        }
@@ -336,37 +336,37 @@ class DataPreprocessor {
         */
        public function renderRecord_groupProc($data, $fieldConfig, $TSconfig, $table, $row, $field) {
                switch ($fieldConfig['config']['internal_type']) {
-               case 'file':
-                       // Init array used to accumulate the files:
-                       $dataAcc = array();
-                       // Now, load the files into the $dataAcc array, whether stored by MM or as a list of filenames:
-                       if ($fieldConfig['config']['MM']) {
-                               $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
-                               $loadDB->start('', 'files', $fieldConfig['config']['MM'], $row['uid']);
-                               // Setting dummy startup
-                               foreach ($loadDB->itemArray as $value) {
-                                       if ($value['id']) {
-                                               $dataAcc[] = rawurlencode($value['id']) . '|' . rawurlencode($value['id']);
+                       case 'file':
+                               // Init array used to accumulate the files:
+                               $dataAcc = array();
+                               // Now, load the files into the $dataAcc array, whether stored by MM or as a list of filenames:
+                               if ($fieldConfig['config']['MM']) {
+                                       $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $loadDB->start('', 'files', $fieldConfig['config']['MM'], $row['uid']);
+                                       // Setting dummy startup
+                                       foreach ($loadDB->itemArray as $value) {
+                                               if ($value['id']) {
+                                                       $dataAcc[] = rawurlencode($value['id']) . '|' . rawurlencode($value['id']);
+                                               }
                                        }
-                               }
-                       } else {
-                               $fileList = GeneralUtility::trimExplode(',', $data, 1);
-                               foreach ($fileList as $value) {
-                                       if ($value) {
-                                               $dataAcc[] = rawurlencode($value) . '|' . rawurlencode($value);
+                               } else {
+                                       $fileList = GeneralUtility::trimExplode(',', $data, 1);
+                                       foreach ($fileList as $value) {
+                                               if ($value) {
+                                                       $dataAcc[] = rawurlencode($value) . '|' . rawurlencode($value);
+                                               }
                                        }
                                }
-                       }
-                       // Implode the accumulation array to a comma separated string:
-                       $data = implode(',', $dataAcc);
-                       break;
-               case 'db':
-                       $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
-                       /** @var $loadDB \TYPO3\CMS\Core\Database\RelationHandler */
-                       $loadDB->start($data, $fieldConfig['config']['allowed'], $fieldConfig['config']['MM'], $row['uid'], $table, $fieldConfig['config']);
-                       $loadDB->getFromDB();
-                       $data = $loadDB->readyForInterface();
-                       break;
+                               // Implode the accumulation array to a comma separated string:
+                               $data = implode(',', $dataAcc);
+                               break;
+                       case 'db':
+                               $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               /** @var $loadDB \TYPO3\CMS\Core\Database\RelationHandler */
+                               $loadDB->start($data, $fieldConfig['config']['allowed'], $fieldConfig['config']['MM'], $row['uid'], $table, $fieldConfig['config']);
+                               $loadDB->getFromDB();
+                               $data = $loadDB->readyForInterface();
+                               break;
                }
                return $data;
        }
@@ -636,105 +636,105 @@ class DataPreprocessor {
        public function selectAddSpecial($dataAcc, $elements, $specialKey) {
                // Special select types:
                switch ((string) $specialKey) {
-               case 'tables':
-                       $tNames = array_keys($GLOBALS['TCA']);
-                       foreach ($tNames as $tableName) {
-                               foreach ($elements as $eKey => $value) {
-                                       if (!strcmp($tableName, $value)) {
-                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($GLOBALS['TCA'][$value]['ctrl']['title']));
-                                       }
-                               }
-                       }
-                       break;
-               case 'pagetypes':
-                       $theTypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
-                       if (is_array($theTypes)) {
-                               foreach ($theTypes as $theTypesArrays) {
+                       case 'tables':
+                               $tNames = array_keys($GLOBALS['TCA']);
+                               foreach ($tNames as $tableName) {
                                        foreach ($elements as $eKey => $value) {
-                                               if (!strcmp($theTypesArrays[1], $value)) {
-                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($theTypesArrays[0]));
+                                               if (!strcmp($tableName, $value)) {
+                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($GLOBALS['TCA'][$value]['ctrl']['title']));
                                                }
                                        }
                                }
-                       }
-                       break;
-               case 'exclude':
-                       $theExcludeFields = BackendUtility::getExcludeFields();
-                       if (is_array($theExcludeFields)) {
-                               foreach ($theExcludeFields as $theExcludeFieldsArrays) {
-                                       foreach ($elements as $eKey => $value) {
-                                               if (!strcmp($theExcludeFieldsArrays[1], $value)) {
-                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode(rtrim($theExcludeFieldsArrays[0], ':'));
+                               break;
+                       case 'pagetypes':
+                               $theTypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
+                               if (is_array($theTypes)) {
+                                       foreach ($theTypes as $theTypesArrays) {
+                                               foreach ($elements as $eKey => $value) {
+                                                       if (!strcmp($theTypesArrays[1], $value)) {
+                                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($theTypesArrays[0]));
+                                                       }
                                                }
                                        }
                                }
-                       }
-                       break;
-               case 'explicitValues':
-                       $theTypes = BackendUtility::getExplicitAuthFieldValues();
-                       foreach ($theTypes as $tableFieldKey => $theTypeArrays) {
-                               if (is_array($theTypeArrays['items'])) {
-                                       foreach ($theTypeArrays['items'] as $itemValue => $itemContent) {
+                               break;
+                       case 'exclude':
+                               $theExcludeFields = BackendUtility::getExcludeFields();
+                               if (is_array($theExcludeFields)) {
+                                       foreach ($theExcludeFields as $theExcludeFieldsArrays) {
                                                foreach ($elements as $eKey => $value) {
-                                                       if (!strcmp(($tableFieldKey . ':' . $itemValue . ':' . $itemContent[0]), $value)) {
-                                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode(('[' . $itemContent[2] . '] ' . $itemContent[1]));
+                                                       if (!strcmp($theExcludeFieldsArrays[1], $value)) {
+                                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode(rtrim($theExcludeFieldsArrays[0], ':'));
                                                        }
                                                }
                                        }
                                }
-                       }
-                       break;
-               case 'languages':
-                       $theLangs = BackendUtility::getSystemLanguages();
-                       foreach ($theLangs as $lCfg) {
-                               foreach ($elements as $eKey => $value) {
-                                       if (!strcmp($lCfg[1], $value)) {
-                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($lCfg[0]);
+                               break;
+                       case 'explicitValues':
+                               $theTypes = BackendUtility::getExplicitAuthFieldValues();
+                               foreach ($theTypes as $tableFieldKey => $theTypeArrays) {
+                                       if (is_array($theTypeArrays['items'])) {
+                                               foreach ($theTypeArrays['items'] as $itemValue => $itemContent) {
+                                                       foreach ($elements as $eKey => $value) {
+                                                               if (!strcmp(($tableFieldKey . ':' . $itemValue . ':' . $itemContent[0]), $value)) {
+                                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode(('[' . $itemContent[2] . '] ' . $itemContent[1]));
+                                                               }
+                                                       }
+                                               }
                                        }
                                }
-                       }
-                       break;
-               case 'custom':
-                       $customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
-                       if (is_array($customOptions)) {
-                               foreach ($customOptions as $coKey => $coValue) {
-                                       if (is_array($coValue['items'])) {
-                                               // Traverse items:
-                                               foreach ($coValue['items'] as $itemKey => $itemCfg) {
-                                                       foreach ($elements as $eKey => $value) {
-                                                               if (!strcmp(($coKey . ':' . $itemKey), $value)) {
-                                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($itemCfg[0]));
+                               break;
+                       case 'languages':
+                               $theLangs = BackendUtility::getSystemLanguages();
+                               foreach ($theLangs as $lCfg) {
+                                       foreach ($elements as $eKey => $value) {
+                                               if (!strcmp($lCfg[1], $value)) {
+                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($lCfg[0]);
+                                               }
+                                       }
+                               }
+                               break;
+                       case 'custom':
+                               $customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
+                               if (is_array($customOptions)) {
+                                       foreach ($customOptions as $coKey => $coValue) {
+                                               if (is_array($coValue['items'])) {
+                                                       // Traverse items:
+                                                       foreach ($coValue['items'] as $itemKey => $itemCfg) {
+                                                               foreach ($elements as $eKey => $value) {
+                                                                       if (!strcmp(($coKey . ':' . $itemKey), $value)) {
+                                                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($this->sL($itemCfg[0]));
+                                                                       }
                                                                }
                                                        }
                                                }
                                        }
                                }
-                       }
-                       break;
-               case 'modListGroup':
+                               break;
+                       case 'modListGroup':
 
-               case 'modListUser':
-                       if (!$this->loadModules) {
-                               $this->loadModules = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
-                               $this->loadModules->load($GLOBALS['TBE_MODULES']);
-                       }
-                       $modList = $specialKey == 'modListUser' ? $this->loadModules->modListUser : $this->loadModules->modListGroup;
-                       foreach ($modList as $theModName) {
-                               foreach ($elements as $eKey => $value) {
-                                       $label = '';
-                                       // Add label for main module:
-                                       $pp = explode('_', $value);
-                                       if (count($pp) > 1) {
-                                               $label .= $GLOBALS['LANG']->moduleLabels['tabs'][($pp[0] . '_tab')] . '>';
-                                       }
-                                       // Add modules own label now:
-                                       $label .= $GLOBALS['LANG']->moduleLabels['tabs'][$value . '_tab'];
-                                       if (!strcmp($theModName, $value)) {
-                                               $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($label);
+                       case 'modListUser':
+                               if (!$this->loadModules) {
+                                       $this->loadModules = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
+                                       $this->loadModules->load($GLOBALS['TBE_MODULES']);
+                               }
+                               $modList = $specialKey == 'modListUser' ? $this->loadModules->modListUser : $this->loadModules->modListGroup;
+                               foreach ($modList as $theModName) {
+                                       foreach ($elements as $eKey => $value) {
+                                               $label = '';
+                                               // Add label for main module:
+                                               $pp = explode('_', $value);
+                                               if (count($pp) > 1) {
+                                                       $label .= $GLOBALS['LANG']->moduleLabels['tabs'][($pp[0] . '_tab')] . '>';
+                                               }
+                                               // Add modules own label now:
+                                               $label .= $GLOBALS['LANG']->moduleLabels['tabs'][$value . '_tab'];
+                                               if (!strcmp($theModName, $value)) {
+                                                       $dataAcc[$eKey] = rawurlencode($value) . '|' . rawurlencode($label);
+                                               }
                                        }
                                }
-                       }
-                       break;
+                               break;
                }
                return $dataAcc;
        }
index 1ac0a13..986b1b4 100644 (file)
@@ -869,32 +869,32 @@ class InlineElement {
                $nameObject = $this->inlineNames['object'];
                $attributes = array();
                switch ($type) {
-               case 'newRecord':
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.createnew', 1);
-                       $icon = 'actions-document-new';
-                       $className = 'typo3-newRecordLink';
-                       $attributes['class'] = 'inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
-                       $attributes['onclick'] = 'return inline.createNewRecord(\'' . $objectPrefix . '\')';
-                       if (isset($conf['inline']['inlineNewButtonStyle']) && $conf['inline']['inlineNewButtonStyle']) {
-                               $attributes['style'] = $conf['inline']['inlineNewButtonStyle'];
-                       }
-                       if (isset($conf['appearance']['newRecordLinkAddTitle']) && $conf['appearance']['newRecordLinkAddTitle']) {
-                               $titleAddon = ' ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$conf['foreign_table']]['ctrl']['title'], 1);
-                       }
-                       break;
-               case 'localize':
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:localizeAllRecords', 1);
-                       $icon = 'actions-document-localize';
-                       $className = 'typo3-localizationLink';
-                       $attributes['onclick'] = 'return inline.synchronizeLocalizeRecords(\'' . $objectPrefix . '\', \'localize\')';
-                       break;
-               case 'synchronize':
-                       $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:synchronizeWithOriginalLanguage', 1);
-                       $icon = 'actions-document-synchronize';
-                       $className = 'typo3-synchronizationLink';
-                       $attributes['class'] = 'inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
-                       $attributes['onclick'] = 'return inline.synchronizeLocalizeRecords(\'' . $objectPrefix . '\', \'synchronize\')';
-                       break;
+                       case 'newRecord':
+                               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.createnew', 1);
+                               $icon = 'actions-document-new';
+                               $className = 'typo3-newRecordLink';
+                               $attributes['class'] = 'inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
+                               $attributes['onclick'] = 'return inline.createNewRecord(\'' . $objectPrefix . '\')';
+                               if (isset($conf['inline']['inlineNewButtonStyle']) && $conf['inline']['inlineNewButtonStyle']) {
+                                       $attributes['style'] = $conf['inline']['inlineNewButtonStyle'];
+                               }
+                               if (isset($conf['appearance']['newRecordLinkAddTitle']) && $conf['appearance']['newRecordLinkAddTitle']) {
+                                       $titleAddon = ' ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$conf['foreign_table']]['ctrl']['title'], 1);
+                               }
+                               break;
+                       case 'localize':
+                               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:localizeAllRecords', 1);
+                               $icon = 'actions-document-localize';
+                               $className = 'typo3-localizationLink';
+                               $attributes['onclick'] = 'return inline.synchronizeLocalizeRecords(\'' . $objectPrefix . '\', \'localize\')';
+                               break;
+                       case 'synchronize':
+                               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:synchronizeWithOriginalLanguage', 1);
+                               $icon = 'actions-document-synchronize';
+                               $className = 'typo3-synchronizationLink';
+                               $attributes['class'] = 'inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
+                               $attributes['onclick'] = 'return inline.synchronizeLocalizeRecords(\'' . $objectPrefix . '\', \'synchronize\')';
+                               break;
                }
                // Create the link:
                $icon = $icon ? IconUtility::getSpriteIcon($icon, array('title' => htmlspecialchars($title . $titleAddon))) : '';
@@ -934,25 +934,25 @@ class InlineElement {
                if (isset($ajaxArguments) && is_array($ajaxArguments) && count($ajaxArguments)) {
                        $ajaxMethod = $ajaxIdParts[1];
                        switch ($ajaxMethod) {
-                       case 'createNewRecord':
-
-                       case 'synchronizeLocalizeRecords':
-
-                       case 'getRecordDetails':
-                               $this->isAjaxCall = TRUE;
-                               // Construct runtime environment for Inline Relational Record Editing:
-                               $this->processAjaxRequestConstruct($ajaxArguments);
-                               // Parse the DOM identifier (string), add the levels to the structure stack (array) and load the TCA config:
-                               $this->parseStructureString($ajaxArguments[0], TRUE);
-                               $this->injectAjaxConfiguration($ajaxArguments);
-                               // Render content:
-                               $ajaxObj->setContentFormat('jsonbody');
-                               $ajaxObj->setContent(call_user_func_array(array(&$this, $ajaxMethod), $ajaxArguments));
-                               break;
-                       case 'setExpandedCollapsedState':
-                               $ajaxObj->setContentFormat('jsonbody');
-                               call_user_func_array(array(&$this, $ajaxMethod), $ajaxArguments);
-                               break;
+                               case 'createNewRecord':
+
+                               case 'synchronizeLocalizeRecords':
+
+                               case 'getRecordDetails':
+                                       $this->isAjaxCall = TRUE;
+                                       // Construct runtime environment for Inline Relational Record Editing:
+                                       $this->processAjaxRequestConstruct($ajaxArguments);
+                                       // Parse the DOM identifier (string), add the levels to the structure stack (array) and load the TCA config:
+                                       $this->parseStructureString($ajaxArguments[0], TRUE);
+                                       $this->injectAjaxConfiguration($ajaxArguments);
+                                       // Render content:
+                                       $ajaxObj->setContentFormat('jsonbody');
+                                       $ajaxObj->setContent(call_user_func_array(array(&$this, $ajaxMethod), $ajaxArguments));
+                                       break;
+                               case 'setExpandedCollapsedState':
+                                       $ajaxObj->setContentFormat('jsonbody');
+                                       call_user_func_array(array(&$this, $ajaxMethod), $ajaxArguments);
+                                       break;
                        }
                }
        }
index 63ef8e5..ad50bb9 100644 (file)
@@ -1194,39 +1194,38 @@ class FormEngine {
                        }
                }
                switch ($PA['fieldConf']['config']['form_type']) {
-               case 'input':
-                       $item = $this->getSingleField_typeInput($table, $field, $row, $PA);
-                       break;
-               case 'text':
-                       $item = $this->getSingleField_typeText($table, $field, $row, $PA);
-                       break;
-               case 'check':
-                       $item = $this->getSingleField_typeCheck($table, $field, $row, $PA);
-                       break;
-               case 'radio':
-                       $item = $this->getSingleField_typeRadio($table, $field, $row, $PA);
-                       break;
-               case 'select':
-                       $item = $this->getSingleField_typeSelect($table, $field, $row, $PA);
-                       break;
-               case 'group':
-                       $item = $this->getSingleField_typeGroup($table, $field, $row, $PA);
-                       break;
-               case 'inline':
-                       $item = $this->inline->getSingleField_typeInline($table, $field, $row, $PA);
-                       break;
-               case 'none':
-                       $item = $this->getSingleField_typeNone($table, $field, $row, $PA);
-                       break;
-               case 'user':
-                       $item = $this->getSingleField_typeUser($table, $field, $row, $PA);
-                       break;
-               case 'flex':
-                       $item = $this->getSingleField_typeFlex($table, $field, $row, $PA);
-                       break;
-               default:
-                       $item = $this->getSingleField_typeUnknown($table, $field, $row, $PA);
-                       break;
+                       case 'input':
+                               $item = $this->getSingleField_typeInput($table, $field, $row, $PA);
+                               break;
+                       case 'text':
+                               $item = $this->getSingleField_typeText($table, $field, $row, $PA);
+                               break;
+                       case 'check':
+                               $item = $this->getSingleField_typeCheck($table, $field, $row, $PA);
+                               break;
+                       case 'radio':
+                               $item = $this->getSingleField_typeRadio($table, $field, $row, $PA);
+                               break;
+                       case 'select':
+                               $item = $this->getSingleField_typeSelect($table, $field, $row, $PA);
+                               break;
+                       case 'group':
+                               $item = $this->getSingleField_typeGroup($table, $field, $row, $PA);
+                               break;
+                       case 'inline':
+                               $item = $this->inline->getSingleField_typeInline($table, $field, $row, $PA);
+                               break;
+                       case 'none':
+                               $item = $this->getSingleField_typeNone($table, $field, $row, $PA);
+                               break;
+                       case 'user':
+                               $item = $this->getSingleField_typeUser($table, $field, $row, $PA);
+                               break;
+                       case 'flex':
+                               $item = $this->getSingleField_typeFlex($table, $field, $row, $PA);
+                               break;
+                       default:
+                               $item = $this->getSingleField_typeUnknown($table, $field, $row, $PA);
                }
                return $item;
        }
@@ -1327,23 +1326,22 @@ class FormEngine {
                }
                foreach ($evalList as $func) {
                        switch ($func) {
-                       case 'required':
-                               $this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
-                               // Mark this field for date/time disposal:
-                               if (array_intersect($evalList, array('date', 'datetime', 'time'))) {
-                                       $this->requiredAdditional[$PA['itemFormElName']]['isPositiveNumber'] = TRUE;
-                               }
-                               break;
-                       default:
-                               // Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
-                               $evalObj = GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
-                               if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
-                                       $_params = array(
-                                               'value' => $PA['itemFormElValue']
-                                       );
-                                       $PA['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
-                               }
-                               break;
+                               case 'required':
+                                       $this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
+                                       // Mark this field for date/time disposal:
+                                       if (array_intersect($evalList, array('date', 'datetime', 'time'))) {
+                                               $this->requiredAdditional[$PA['itemFormElName']]['isPositiveNumber'] = TRUE;
+                                       }
+                                       break;
+                               default:
+                                       // Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
+                                       $evalObj = GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
+                                       if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
+                                               $_params = array(
+                                                       'value' => $PA['itemFormElValue']
+                                               );
+                                               $PA['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
+                                       }
                        }
                }
                $paramsList = '\'' . $PA['itemFormElName'] . '\',\'' . implode(',', $evalList) . '\',\'' . trim($config['is_in']) . '\',' . (isset($config['checkbox']) ? 1 : 0) . ',\'' . $config['checkbox'] . '\'';
@@ -1559,19 +1557,18 @@ function ' . $evalData . '(value) {
                                $evalList = GeneralUtility::trimExplode(',', $config['eval'], 1);
                                foreach ($evalList as $func) {
                                        switch ($func) {
-                                       case 'required':
-                                               $this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
-                                               break;
-                                       default:
-                                               // Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval() and \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_text_Eval()
-                                               $evalObj = GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
-                                               if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
-                                                       $_params = array(
-                                                               'value' => $PA['itemFormElValue']
-                                                       );
-                                                       $PA['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
-                                               }
-                                               break;
+                                               case 'required':
+                                                       $this->registerRequiredProperty('field', $table . '_' . $row['uid'] . '_' . $field, $PA['itemFormElName']);
+                                                       break;
+                                               default:
+                                                       // Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval() and \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_text_Eval()
+                                                       $evalObj = GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
+                                                       if (is_object($evalObj) && method_exists($evalObj, 'deevaluateFieldValue')) {
+                                                               $_params = array(
+                                                                       'value' => $PA['itemFormElValue']
+                                                               );
+                                                               $PA['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
+                                                       }
                                        }
                                }
                                $iOnChange = implode('', $PA['fieldChangeFunc']);
@@ -2319,6 +2316,7 @@ function ' . $evalData . '(value) {
                switch ((string) $config['internal_type']) {
                case 'file_reference':
                        $config['uploadfolder'] = '';
+                       // Fall through
                case 'file':
                        // Creating string showing allowed types:
                        $tempFT = GeneralUtility::trimExplode(',', $allowed, TRUE);
@@ -2680,27 +2678,26 @@ function ' . $evalData . '(value) {
                                                $skipCondition = FALSE;
                                                $fakeRow = array();
                                                switch ($splittedCondition[0]) {
-                                               case 'FIELD':
-                                                       list($sheetName, $fieldName) = GeneralUtility::trimExplode('.', $splittedCondition[1]);
-                                                       $fieldValue = $editData['data'][$sheetName][$lang][$fieldName];
-                                                       $splittedCondition[1] = $fieldName;
-                                                       $dataStruct['ROOT']['TCEforms']['displayCond'] = join(':', $splittedCondition);
-                                                       $fakeRow = array($fieldName => $fieldValue);
-                                                       break;
-                                               case 'HIDE_FOR_NON_ADMINS':
+                                                       case 'FIELD':
+                                                               list($sheetName, $fieldName) = GeneralUtility::trimExplode('.', $splittedCondition[1]);
+                                                               $fieldValue = $editData['data'][$sheetName][$lang][$fieldName];
+                                                               $splittedCondition[1] = $fieldName;
+                                                               $dataStruct['ROOT']['TCEforms']['displayCond'] = join(':', $splittedCondition);
+                                                               $fakeRow = array($fieldName => $fieldValue);
+                                                               break;
+                                                       case 'HIDE_FOR_NON_ADMINS':
 
-                                               case 'VERSION':
+                                                       case 'VERSION':
 
-                                               case 'HIDE_L10N_SIBLINGS':
+                                                       case 'HIDE_L10N_SIBLINGS':
 
-                                               case 'EXT':
-                                                       break;
-                                               case 'REC':
-                                                       $fakeRow = array('uid' => $row['uid']);
-                                                       break;
-                                               default:
-                                                       $skipCondition = TRUE;
-                                                       break;
+                                                       case 'EXT':
+                                                               break;
+                                                       case 'REC':
+                                                               $fakeRow = array('uid' => $row['uid']);
+                                                               break;
+                                                       default:
+                                                               $skipCondition = TRUE;
                                                }
                                                $displayConditionResult = TRUE;
                                                if ($dataStruct['ROOT']['TCEforms']['displayCond']) {
@@ -3101,80 +3098,80 @@ function ' . $evalData . '(value) {
        public function formatValue($config, $itemValue) {
                $format = trim($config['format']);
                switch ($format) {
-               case 'date':
-                       if ($itemValue) {
-                               $option = trim($config['format.']['option']);
-                               if ($option) {
-                                       if ($config['format.']['strftime']) {
-                                               $value = strftime($option, $itemValue);
+                       case 'date':
+                               if ($itemValue) {
+                                       $option = trim($config['format.']['option']);
+                                       if ($option) {
+                                               if ($config['format.']['strftime']) {
+                                                       $value = strftime($option, $itemValue);
+                                               } else {
+                                                       $value = date($option, $itemValue);
+                                               }
                                        } else {
-                                               $value = date($option, $itemValue);
+                                               $value = date('d-m-Y', $itemValue);
                                        }
                                } else {
-                                       $value = date('d-m-Y', $itemValue);
+                                       $value = '';
                                }
-                       } else {
-                               $value = '';
-                       }
-                       if ($config['format.']['appendAge']) {
-                               $value .= ' (' . BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) . ')';
-                       }
-                       $itemValue = $value;
-                       break;
-               case 'datetime':
-                       // compatibility with "eval" (type "input")
-                       $itemValue = date('H:i d-m-Y', $itemValue);
-                       break;
-               case 'time':
-                       // compatibility with "eval" (type "input")
-                       $itemValue = date('H:i', $itemValue);
-                       break;
-               case 'timesec':
-                       // compatibility with "eval" (type "input")
-                       $itemValue = date('H:i:s', $itemValue);
-                       break;
-               case 'year':
-                       // compatibility with "eval" (type "input")
-                       $itemValue = date('Y', $itemValue);
-                       break;
-               case 'int':
-                       $baseArr = array('dec' => 'd', 'hex' => 'x', 'HEX' => 'X', 'oct' => 'o', 'bin' => 'b');
-                       $base = trim($config['format.']['base']);
-                       $format = $baseArr[$base] ? $baseArr[$base] : 'd';
-                       $itemValue = sprintf('%' . $format, $itemValue);
-                       break;
-               case 'float':
-                       $precision = MathUtility::forceIntegerInRange($config['format.']['precision'], 1, 10, 2);
-                       $itemValue = sprintf('%.' . $precision . 'f', $itemValue);
-                       break;
-               case 'number':
-                       $format = trim($config['format.']['option']);
-                       $itemValue = sprintf('%' . $format, $itemValue);
-                       break;
-               case 'md5':
-                       $itemValue = md5($itemValue);
-                       break;
-               case 'filesize':
-                       $value = GeneralUtility::formatSize(intval($itemValue));
-                       if ($config['format.']['appendByteSize']) {
-                               $value .= ' (' . $itemValue . ')';
-                       }
-                       $itemValue = $value;
-                       break;
-               case 'user':
-                       $func = trim($config['format.']['userFunc']);
-                       if ($func) {
-                               $params = array(
-                                       'value' => $itemValue,
-                                       'args' => $config['format.']['userFunc'],
-                                       'config' => $config,
-                                       'pObj' => &$this
-                               );
-                               $itemValue = GeneralUtility::callUserFunction($func, $params, $this);
-                       }
-                       break;
-               default:
-                       break;
+                               if ($config['format.']['appendAge']) {
+                                       $value .= ' (' . BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) . ')';
+                               }
+                               $itemValue = $value;
+                               break;
+                       case 'datetime':
+                               // compatibility with "eval" (type "input")
+                               $itemValue = date('H:i d-m-Y', $itemValue);
+                               break;
+                       case 'time':
+                               // compatibility with "eval" (type "input")
+                               $itemValue = date('H:i', $itemValue);
+                               break;
+                       case 'timesec':
+                               // compatibility with "eval" (type "input")
+                               $itemValue = date('H:i:s', $itemValue);
+                               break;
+                       case 'year':
+                               // compatibility with "eval" (type "input")
+                               $itemValue = date('Y', $itemValue);
+                               break;
+                       case 'int':
+                               $baseArr = array('dec' => 'd', 'hex' => 'x', 'HEX' => 'X', 'oct' => 'o', 'bin' => 'b');
+                               $base = trim($config['format.']['base']);
+                               $format = $baseArr[$base] ? $baseArr[$base] : 'd';
+                               $itemValue = sprintf('%' . $format, $itemValue);
+                               break;
+                       case 'float':
+                               $precision = MathUtility::forceIntegerInRange($config['format.']['precision'], 1, 10, 2);
+                               $itemValue = sprintf('%.' . $precision . 'f', $itemValue);
+                               break;
+                       case 'number':
+                               $format = trim($config['format.']['option']);
+                               $itemValue = sprintf('%' . $format, $itemValue);
+                               break;
+                       case 'md5':
+                               $itemValue = md5($itemValue);
+                               break;
+                       case 'filesize':
+                               $value = GeneralUtility::formatSize(intval($itemValue));
+                               if ($config['format.']['appendByteSize']) {
+                                       $value .= ' (' . $itemValue . ')';
+                               }
+                               $itemValue = $value;
+                               break;
+                       case 'user':
+                               $func = trim($config['format.']['userFunc']);
+                               if ($func) {
+                                       $params = array(
+                                               'value' => $itemValue,
+                                               'args' => $config['format.']['userFunc'],
+                                               'config' => $config,
+                                               'pObj' => &$this
+                                       );
+                                       $itemValue = GeneralUtility::callUserFunction($func, $params, $this);
+                               }
+                               break;
+                       default:
+                               // Do nothing
                }
                return $itemValue;
        }
@@ -3664,45 +3661,44 @@ function ' . $evalData . '(value) {
                if (is_array($itemArray)) {
                        $itemArrayC = count($itemArray);
                        switch ($mode) {
-                       case 'db':
-                               foreach ($itemArray as $pp) {
-                                       $pRec = BackendUtility::getRecordWSOL($pp['table'], $pp['id']);
-                                       if (is_array($pRec)) {
-                                               $pTitle = BackendUtility::getRecordTitle($pp['table'], $pRec, FALSE, TRUE);
-                                               $pUid = $pp['table'] . '_' . $pp['id'];
-                                               $uidList[] = $pUid;
-                                               $title = htmlspecialchars($pTitle);
-                                               $opt[] = '<option value="' . htmlspecialchars($pUid) . '" title="' . $title . '">' . $title . '</option>';
+                               case 'db':
+                                       foreach ($itemArray as $pp) {
+                                               $pRec = BackendUtility::getRecordWSOL($pp['table'], $pp['id']);
+                                               if (is_array($pRec)) {
+                                                       $pTitle = BackendUtility::getRecordTitle($pp['table'], $pRec, FALSE, TRUE);
+                                                       $pUid = $pp['table'] . '_' . $pp['id'];
+                                                       $uidList[] = $pUid;
+                                                       $title = htmlspecialchars($pTitle);
+                                                       $opt[] = '<option value="' . htmlspecialchars($pUid) . '" title="' . $title . '">' . $title . '</option>';
+                                               }
+                                       }
+                                       break;
+                               case 'file_reference':
+
+                               case 'file':
+                                       foreach ($itemArray as $item) {
+                                               $itemParts = explode('|', $item);
+                                               $uidList[] = ($pUid = ($pTitle = $itemParts[0]));
+                                               $title = htmlspecialchars(basename(rawurldecode($itemParts[1])));
+                                               $opt[] = '<option value="' . htmlspecialchars(rawurldecode($itemParts[0])) . '" title="' . $title . '">' . $title . '</option>';
+                                       }
+                                       break;
+                               case 'folder':
+                                       foreach ($itemArray as $pp) {
+                                               $pParts = explode('|', $pp);
+                                               $uidList[] = ($pUid = ($pTitle = $pParts[0]));
+                                               $title = htmlspecialchars(rawurldecode($pParts[0]));
+                                               $opt[] = '<option value="' . htmlspecialchars(rawurldecode($pParts[0])) . '" title="' . $title . '">' . $title . '</option>';
+                                       }
+                                       break;
+                               default:
+                                       foreach ($itemArray as $pp) {
+                                               $pParts = explode('|', $pp, 2);
+                                               $uidList[] = ($pUid = $pParts[0]);
+                                               $pTitle = $pParts[1];
+                                               $title = htmlspecialchars(rawurldecode($pTitle));
+                                               $opt[] = '<option value="' . htmlspecialchars(rawurldecode($pUid)) . '" title="' . $title . '">' . $title . '</option>';
                                        }
-                               }
-                               break;
-                       case 'file_reference':
-
-                       case 'file':
-                               foreach ($itemArray as $item) {
-                                       $itemParts = explode('|', $item);
-                                       $uidList[] = ($pUid = ($pTitle = $itemParts[0]));
-                                       $title = htmlspecialchars(basename(rawurldecode($itemParts[1])));
-                                       $opt[] = '<option value="' . htmlspecialchars(rawurldecode($itemParts[0])) . '" title="' . $title . '">' . $title . '</option>';
-                               }
-                               break;
-                       case 'folder':
-                               foreach ($itemArray as $pp) {
-                                       $pParts = explode('|', $pp);
-                                       $uidList[] = ($pUid = ($pTitle = $pParts[0]));
-                                       $title = htmlspecialchars(rawurldecode($pParts[0]));
-                                       $opt[] = '<option value="' . htmlspecialchars(rawurldecode($pParts[0])) . '" title="' . $title . '">' . $title . '</option>';
-                               }
-                               break;
-                       default:
-                               foreach ($itemArray as $pp) {
-                                       $pParts = explode('|', $pp, 2);
-                                       $uidList[] = ($pUid = $pParts[0]);
-                                       $pTitle = $pParts[1];
-                                       $title = htmlspecialchars(rawurldecode($pTitle));
-                                       $opt[] = '<option value="' . htmlspecialchars(rawurldecode($pUid)) . '" title="' . $title . '">' . $title . '</option>';
-                               }
-                               break;
                        }
                }
                // Create selector box of the options
@@ -3844,39 +3840,39 @@ function ' . $evalData . '(value) {
                $output = array();
                if (is_object($this->clipObj)) {
                        switch ($mode) {
-                       case 'file_reference':
-
-                       case 'file':
-                               $elFromTable = $this->clipObj->elFromTable('_FILE');
-                               $allowedExts = GeneralUtility::trimExplode(',', $allowed, 1);
-                               // If there are a set of allowed extensions, filter the content:
-                               if ($allowedExts) {
-                                       foreach ($elFromTable as $elValue) {
-                                               $pI = pathinfo($elValue);
-                                               $ext = strtolower($pI['extension']);
-                                               if (in_array($ext, $allowedExts)) {
-                                                       $output[] = $elValue;
+                               case 'file_reference':
+
+                               case 'file':
+                                       $elFromTable = $this->clipObj->elFromTable('_FILE');
+                                       $allowedExts = GeneralUtility::trimExplode(',', $allowed, 1);
+                                       // If there are a set of allowed extensions, filter the content:
+                                       if ($allowedExts) {
+                                               foreach ($elFromTable as $elValue) {
+                                                       $pI = pathinfo($elValue);
+                                                       $ext = strtolower($pI['extension']);
+                                                       if (in_array($ext, $allowedExts)) {
+                                                               $output[] = $elValue;
+                                                       }
                                                }
+                                       } else {
+                                               // If all is allowed, insert all: (This does NOT respect any disallowed extensions, but those will be filtered away by the backend TCEmain)
+                                               $output = $elFromTable;
                                        }
-                               } else {
-                                       // If all is allowed, insert all: (This does NOT respect any disallowed extensions, but those will be filtered away by the backend TCEmain)
-                                       $output = $elFromTable;
-                               }
-                               break;
-                       case 'db':
-                               $allowedTables = GeneralUtility::trimExplode(',', $allowed, 1);
-                               // All tables allowed for relation:
-                               if (!strcmp(trim($allowedTables[0]), '*')) {
-                                       $output = $this->clipObj->elFromTable('');
-                               } else {
-                                       // Only some tables, filter them:
-                                       foreach ($allowedTables as $tablename) {
-                                               $elFromTable = $this->clipObj->elFromTable($tablename);
-                                               $output = array_merge($output, $elFromTable);
+                                       break;
+                               case 'db':
+                                       $allowedTables = GeneralUtility::trimExplode(',', $allowed, 1);
+                                       // All tables allowed for relation:
+                                       if (!strcmp(trim($allowedTables[0]), '*')) {
+                                               $output = $this->clipObj->elFromTable('');
+                                       } else {
+                                               // Only some tables, filter them:
+                                               foreach ($allowedTables as $tablename) {
+                                                       $elFromTable = $this->clipObj->elFromTable($tablename);
+                                                       $output = array_merge($output, $elFromTable);
+                                               }
                                        }
-                               }
-                               $output = array_keys($output);
-                               break;
+                                       $output = array_keys($output);
+                                       break;
                        }
                }
                return $output;
@@ -3951,129 +3947,129 @@ function ' . $evalData . '(value) {
                                                $icon = $iTitle;
                                        }
                                        switch ((string) $wConf['type']) {
-                                       case 'userFunc':
-
-                                       case 'script':
-
-                                       case 'popup':
-
-                                       case 'colorbox':
-
-                                       case 'slider':
-                                               if (!$wConf['notNewRecords'] || MathUtility::canBeInterpretedAsInteger($row['uid'])) {
-                                                       // Setting &P array contents:
-                                                       $params = array();
-                                                       $params['fieldConfig'] = $fieldConfig;
-                                                       $params['params'] = $wConf['params'];
-                                                       $params['exampleImg'] = $wConf['exampleImg'];
-                                                       $params['table'] = $table;
-                                                       $params['uid'] = $row['uid'];
-                                                       $params['pid'] = $row['pid'];
-                                                       $params['field'] = $field;
-                                                       $params['flexFormPath'] = $flexFormPath;
-                                                       $params['md5ID'] = $md5ID;
-                                                       $params['returnUrl'] = $this->thisReturnUrl();
-                                                       // Resolving script filename and setting URL.
-                                                       if (!strcmp(substr($wConf['script'], 0, 4), 'EXT:')) {
-                                                               $wScript = GeneralUtility::getFileAbsFileName($wConf['script']);
-                                                               if ($wScript) {
-                                                                       $wScript = '../' . substr($wScript, strlen(PATH_site));
+                                               case 'userFunc':
+
+                                               case 'script':
+
+                                               case 'popup':
+
+                                               case 'colorbox':
+
+                                               case 'slider':
+                                                       if (!$wConf['notNewRecords'] || MathUtility::canBeInterpretedAsInteger($row['uid'])) {
+                                                               // Setting &P array contents:
+                                                               $params = array();
+                                                               $params['fieldConfig'] = $fieldConfig;
+                                                               $params['params'] = $wConf['params'];
+                                                               $params['exampleImg'] = $wConf['exampleImg'];
+                                                               $params['table'] = $table;
+                                                               $params['uid'] = $row['uid'];
+                                                               $params['pid'] = $row['pid'];
+                                                               $params['field'] = $field;
+                                                               $params['flexFormPath'] = $flexFormPath;
+                                                               $params['md5ID'] = $md5ID;
+                                                               $params['returnUrl'] = $this->thisReturnUrl();
+                                                               // Resolving script filename and setting URL.
+                                                               if (!strcmp(substr($wConf['script'], 0, 4), 'EXT:')) {
+                                                                       $wScript = GeneralUtility::getFileAbsFileName($wConf['script']);
+                                                                       if ($wScript) {
+                                                                               $wScript = '../' . substr($wScript, strlen(PATH_site));
+                                                                       } else {
+                                                                               break;
+                                                                       }
                                                                } else {
+                                                                       $wScript = $wConf['script'];
+                                                               }
+                                                               $url = $this->backPath . $wScript . (strstr($wScript, '?') ? '' : '?');
+                                                               // If there is no script and the type is "colorbox", break right away:
+                                                               if ((string) $wConf['type'] == 'colorbox' && !$wConf['script']) {
                                                                        break;
                                                                }
-                                                       } else {
-                                                               $wScript = $wConf['script'];
+                                                               // If "script" type, create the links around the icon:
+                                                               if ((string) $wConf['type'] == 'script') {
+                                                                       $aUrl = $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params));
+                                                                       $outArr[] = '<a href="' . htmlspecialchars($aUrl) . '" onclick="' . $this->blur() . 'return !TBE_EDITOR.isFormChanged();">' . $icon . '</a>';
+                                                               } else {
+                                                                       // ... else types "popup", "colorbox" and "userFunc" will need additional parameters:
+                                                                       $params['formName'] = $this->formName;
+                                                                       $params['itemName'] = $itemName;
+                                                                       $params['fieldChangeFunc'] = $fieldChangeFunc;
+                                                                       $params['fieldChangeFuncHash'] = GeneralUtility::hmac(serialize($fieldChangeFunc));
+                                                                       switch ((string) $wConf['type']) {
+                                                                       case 'popup':
+
+                                                                       case 'colorbox':
+                                                                               // Current form value is passed as P[currentValue]!
+                                                                               $addJS = $wConf['popup_onlyOpenIfSelected'] ? 'if (!TBE_EDITOR.curSelected(\'' . $itemName . $listFlag . '\')){alert(' . $GLOBALS['LANG']->JScharCode($this->getLL('m_noSelItemForEdit')) . '); return false;}' : '';
+                                                                               $curSelectedValues = '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(\'' . $itemName . $listFlag . '\')';
+                                                                               $aOnClick = $this->blur() . $addJS . 'vHWin=window.open(\'' . $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params)) . '\'+\'&P[currentValue]=\'+TBE_EDITOR.rawurlencode(' . $this->elName($itemName) . '.value,200)' . $curSelectedValues . ',\'popUp' . $md5ID . '\',\'' . $wConf['JSopenParams'] . '\');' . 'vHWin.focus();return false;';
+                                                                               // Setting "colorBoxLinks" - user LATER to wrap around the color box as well:
+                                                                               $colorBoxLinks = array('<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">', '</a>');
+                                                                               if ((string) $wConf['type'] == 'popup') {
+                                                                                       $outArr[] = $colorBoxLinks[0] . $icon . $colorBoxLinks[1];
+                                                                               }
+                                                                               break;
+                                                                       case 'userFunc':
+                                                                               // Reference set!
+                                                                               $params['item'] = &$item;
+                                                                               $params['icon'] = $icon;
+                                                                               $params['iTitle'] = $iTitle;
+                                                                               $params['wConf'] = $wConf;
+                                                                               $params['row'] = $row;
+                                                                               $outArr[] = GeneralUtility::callUserFunction($wConf['userFunc'], $params, $this);
+                                                                               break;
+                                                                       case 'slider':
+                                                                               // Reference set!
+                                                                               $params['item'] = &$item;
+                                                                               $params['icon'] = $icon;
+                                                                               $params['iTitle'] = $iTitle;
+                                                                               $params['wConf'] = $wConf;
+                                                                               $params['row'] = $row;
+                                                                               $wizard = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\ValueSlider');
+                                                                               $outArr[] = call_user_func_array(array(&$wizard, 'renderWizard'), array(&$params, &$this));
+                                                                       }
+                                                               }
+                                                               // Hide the real form element?
+                                                               if (is_array($wConf['hideParent']) || $wConf['hideParent']) {
+                                                                       // Setting the item to a hidden-field.
+                                                                       $item = $itemKinds[1];
+                                                                       if (is_array($wConf['hideParent'])) {
+                                                                               $item .= $this->getSingleField_typeNone_render($wConf['hideParent'], $PA['itemFormElValue']);
+                                                                       }
+                                                               }
                                                        }
-                                                       $url = $this->backPath . $wScript . (strstr($wScript, '?') ? '' : '?');
-                                                       // If there is no script and the type is "colorbox", break right away:
-                                                       if ((string) $wConf['type'] == 'colorbox' && !$wConf['script']) {
-                                                               break;
+                                                       break;
+                                               case 'select':
+                                                       $fieldValue = array('config' => $wConf);
+                                                       $TSconfig = $this->setTSconfig($table, $row);
+                                                       $TSconfig[$field] = $TSconfig[$field]['wizards.'][$wid . '.'];
+                                                       $selItems = $this->addSelectOptionsToItemArray($this->initItemArray($fieldValue), $fieldValue, $TSconfig, $field);
+                                                       // Process items by a user function:
+                                                       if (!empty($wConf['itemsProcFunc'])) {
+                                                               $funcConfig = !empty($wConf['itemsProcFunc.']) ? $wConf['itemsProcFunc.'] : array();
+                                                               $selItems = $this->procItems($selItems, $funcConfig, $wConf, $table, $row, $field);
                                                        }
-                                                       // If "script" type, create the links around the icon:
-                                                       if ((string) $wConf['type'] == 'script') {
-                                                               $aUrl = $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params));
-                                                               $outArr[] = '<a href="' . htmlspecialchars($aUrl) . '" onclick="' . $this->blur() . 'return !TBE_EDITOR.isFormChanged();">' . $icon . '</a>';
+                                                       $opt = array();
+                                                       $opt[] = '<option>' . $iTitle . '</option>';
+                                                       foreach ($selItems as $p) {
+                                                               $opt[] = '<option value="' . htmlspecialchars($p[1]) . '">' . htmlspecialchars($p[0]) . '</option>';
+                                                       }
+                                                       if ($wConf['mode'] == 'append') {
+                                                               $assignValue = $this->elName($itemName) . '.value=\'\'+this.options[this.selectedIndex].value+' . $this->elName($itemName) . '.value';
+                                                       } elseif ($wConf['mode'] == 'prepend') {
+                                                               $assignValue = $this->elName($itemName) . '.value+=\'\'+this.options[this.selectedIndex].value';
                                                        } else {
-                                                               // ... else types "popup", "colorbox" and "userFunc" will need additional parameters:
-                                                               $params['formName'] = $this->formName;
-                                                               $params['itemName'] = $itemName;
-                                                               $params['fieldChangeFunc'] = $fieldChangeFunc;
-                                                               $params['fieldChangeFuncHash'] = GeneralUtility::hmac(serialize($fieldChangeFunc));
-                                                               switch ((string) $wConf['type']) {
-                                                               case 'popup':
-
-                                                               case 'colorbox':
-                                                                       // Current form value is passed as P[currentValue]!
-                                                                       $addJS = $wConf['popup_onlyOpenIfSelected'] ? 'if (!TBE_EDITOR.curSelected(\'' . $itemName . $listFlag . '\')){alert(' . $GLOBALS['LANG']->JScharCode($this->getLL('m_noSelItemForEdit')) . '); return false;}' : '';
-                                                                       $curSelectedValues = '+\'&P[currentSelectedValues]=\'+TBE_EDITOR.curSelected(\'' . $itemName . $listFlag . '\')';
-                                                                       $aOnClick = $this->blur() . $addJS . 'vHWin=window.open(\'' . $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params)) . '\'+\'&P[currentValue]=\'+TBE_EDITOR.rawurlencode(' . $this->elName($itemName) . '.value,200)' . $curSelectedValues . ',\'popUp' . $md5ID . '\',\'' . $wConf['JSopenParams'] . '\');' . 'vHWin.focus();return false;';
-                                                                       // Setting "colorBoxLinks" - user LATER to wrap around the color box as well:
-                                                                       $colorBoxLinks = array('<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">', '</a>');
-                                                                       if ((string) $wConf['type'] == 'popup') {
-                                                                               $outArr[] = $colorBoxLinks[0] . $icon . $colorBoxLinks[1];
-                                                                       }
-                                                                       break;
-                                                               case 'userFunc':
-                                                                       // Reference set!
-                                                                       $params['item'] = &$item;
-                                                                       $params['icon'] = $icon;
-                                                                       $params['iTitle'] = $iTitle;
-                                                                       $params['wConf'] = $wConf;
-                                                                       $params['row'] = $row;
-                                                                       $outArr[] = GeneralUtility::callUserFunction($wConf['userFunc'], $params, $this);
-                                                                       break;
-                                                               case 'slider':
-                                                                       // Reference set!
-                                                                       $params['item'] = &$item;
-                                                                       $params['icon'] = $icon;
-                                                                       $params['iTitle'] = $iTitle;
-                                                                       $params['wConf'] = $wConf;
-                                                                       $params['row'] = $row;
-                                                                       $wizard = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\ValueSlider');
-                                                                       $outArr[] = call_user_func_array(array(&$wizard, 'renderWizard'), array(&$params, &$this));
-                                                               }
+                                                               $assignValue = $this->elName($itemName) . '.value=this.options[this.selectedIndex].value';
                                                        }
-                                                       // Hide the real form element?
-                                                       if (is_array($wConf['hideParent']) || $wConf['hideParent']) {
-                                                               // Setting the item to a hidden-field.
-                                                               $item = $itemKinds[1];
-                                                               if (is_array($wConf['hideParent'])) {
-                                                                       $item .= $this->getSingleField_typeNone_render($wConf['hideParent'], $PA['itemFormElValue']);
-                                                               }
+                                                       $sOnChange = $assignValue . ';this.blur();this.selectedIndex=0;' . implode('', $fieldChangeFunc);
+                                                       $outArr[] = '<select id="' . uniqid('tceforms-select-') . '" class="tceforms-select tceforms-wizardselect" name="_WIZARD' . $fName . '" onchange="' . htmlspecialchars($sOnChange) . '">' . implode('', $opt) . '</select>';
+                                                       break;
+                                               case 'suggest':
+                                                       if (isset($PA['fieldTSConfig']['suggest.']['default.']['hide']) && (bool) $PA['fieldTSConfig']['suggest.']['default.']['hide'] == TRUE) {
+                                                               break;
                                                        }
-                                               }
-                                               break;
-                                       case 'select':
-                                               $fieldValue = array('config' => $wConf);
-                                               $TSconfig = $this->setTSconfig($table, $row);
-                                               $TSconfig[$field] = $TSconfig[$field]['wizards.'][$wid . '.'];
-                                               $selItems = $this->addSelectOptionsToItemArray($this->initItemArray($fieldValue), $fieldValue, $TSconfig, $field);
-                                               // Process items by a user function:
-                                               if (!empty($wConf['itemsProcFunc'])) {
-                                                       $funcConfig = !empty($wConf['itemsProcFunc.']) ? $wConf['itemsProcFunc.'] : array();
-                                                       $selItems = $this->procItems($selItems, $funcConfig, $wConf, $table, $row, $field);
-                                               }
-                                               $opt = array();
-                                               $opt[] = '<option>' . $iTitle . '</option>';
-                                               foreach ($selItems as $p) {
-                                                       $opt[] = '<option value="' . htmlspecialchars($p[1]) . '">' . htmlspecialchars($p[0]) . '</option>';
-                                               }
-                                               if ($wConf['mode'] == 'append') {
-                                                       $assignValue = $this->elName($itemName) . '.value=\'\'+this.options[this.selectedIndex].value+' . $this->elName($itemName) . '.value';
-                                               } elseif ($wConf['mode'] == 'prepend') {
-                                                       $assignValue = $this->elName($itemName) . '.value+=\'\'+this.options[this.selectedIndex].value';
-                                               } else {
-                                                       $assignValue = $this->elName($itemName) . '.value=this.options[this.selectedIndex].value';
-                                               }
-                                               $sOnChange = $assignValue . ';this.blur();this.selectedIndex=0;' . implode('', $fieldChangeFunc);
-                                               $outArr[] = '<select id="' . uniqid('tceforms-select-') . '" class="tceforms-select tceforms-wizardselect" name="_WIZARD' . $fName . '" onchange="' . htmlspecialchars($sOnChange) . '">' . implode('', $opt) . '</select>';
-                                               break;
-                                       case 'suggest':
-                                               if (isset($PA['fieldTSConfig']['suggest.']['default.']['hide']) && (bool) $PA['fieldTSConfig']['suggest.']['default.']['hide'] == TRUE) {
+                                                       $outArr[] = $this->suggest->renderSuggestSelector($PA['itemFormElName'], $table, $field, $row, $PA);
                                                        break;
-                                               }
-                                               $outArr[] = $this->suggest->renderSuggestSelector($PA['itemFormElName'], $table, $field, $row, $PA);
-                                               break;
                                        }
                                        // Color wizard colorbox:
                                        if ((string) $wConf['type'] == 'colorbox') {
@@ -4616,171 +4612,171 @@ function ' . $evalData . '(value) {
                // If 'special' is configured:
                if ($fieldValue['config']['special']) {
                        switch ($fieldValue['config']['special']) {
-                       case 'tables':
-                               $temp_tc = array_keys($GLOBALS['TCA']);
-                               foreach ($temp_tc as $theTableNames) {
-                                       if (!$GLOBALS['TCA'][$theTableNames]['ctrl']['adminOnly']) {
+                               case 'tables':
+                                       $temp_tc = array_keys($GLOBALS['TCA']);
+                                       foreach ($temp_tc as $theTableNames) {
+                                               if (!$GLOBALS['TCA'][$theTableNames]['ctrl']['adminOnly']) {
+                                                       // Icon:
+                                                       $icon = IconUtility::mapRecordTypeToSpriteIconName($theTableNames, array());
+                                                       // Add help text
+                                                       $helpText = array();
+                                                       $GLOBALS['LANG']->loadSingleTableDescription($theTableNames);
+                                                       $helpTextArray = $GLOBALS['TCA_DESCR'][$theTableNames]['columns'][''];
+                                                       if (!empty($helpTextArray['description'])) {
+                                                               $helpText['description'] = $helpTextArray['description'];
+                                                       }
+                                                       // Item configuration:
+                                                       $items[] = array(
+                                                               $this->sL($GLOBALS['TCA'][$theTableNames]['ctrl']['title']),
+                                                               $theTableNames,
+                                                               $icon,
+                                                               $helpText
+                                                       );
+                                               }
+                                       }
+                                       break;
+                               case 'pagetypes':
+                                       $theTypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
+                                       foreach ($theTypes as $theTypeArrays) {
                                                // Icon:
-                                               $icon = IconUtility::mapRecordTypeToSpriteIconName($theTableNames, array());
+                                               $icon = 'empty-emtpy';
+                                               if ($theTypeArrays[1] != '--div--') {
+                                                       $icon = IconUtility::mapRecordTypeToSpriteIconName('pages', array('doktype' => $theTypeArrays[1]));
+                                               }
+                                               // Item configuration:
+                                               $items[] = array(
+                                                       $this->sL($theTypeArrays[0]),
+                                                       $theTypeArrays[1],
+                                                       $icon
+                                               );
+                                       }
+                                       break;
+                               case 'exclude':
+                                       $theTypes = BackendUtility::getExcludeFields();
+                                       foreach ($theTypes as $theTypeArrays) {
+                                               list($theTable, $theFullField) = explode(':', $theTypeArrays[1]);
+                                               // If the field comes from a FlexForm, the syntax is more complex
+                                               $theFieldParts = explode(';', $theFullField);
+                                               $theField = array_pop($theFieldParts);
+                                               // Add header if not yet set for table:
+                                               if (!array_key_exists($theTable, $items)) {
+                                                       $icon = IconUtility::mapRecordTypeToSpriteIconName($theTable, array());
+                                                       $items[$theTable] = array(
+                                                               $this->sL($GLOBALS['TCA'][$theTable]['ctrl']['title']),
+                                                               '--div--',
+                                                               $icon
+                                                       );
+                                               }
                                                // Add help text
                                                $helpText = array();
-                                               $GLOBALS['LANG']->loadSingleTableDescription($theTableNames);
-                                               $helpTextArray = $GLOBALS['TCA_DESCR'][$theTableNames]['columns'][''];
+                                               $GLOBALS['LANG']->loadSingleTableDescription($theTable);
+                                               $helpTextArray = $GLOBALS['TCA_DESCR'][$theTable]['columns'][$theFullField];
                                                if (!empty($helpTextArray['description'])) {
                                                        $helpText['description'] = $helpTextArray['description'];
                                                }
                                                // Item configuration:
                                                $items[] = array(
-                                                       $this->sL($GLOBALS['TCA'][$theTableNames]['ctrl']['title']),
-                                                       $theTableNames,
-                                                       $icon,
+                                                       rtrim($GLOBALS['LANG']->sl($GLOBALS['TCA'][$theTable]['columns'][$theField]['label']), ':') . ' (' . $theField . ')',
+                                                       $theTypeArrays[1],
+                                                       'empty-empty',
                                                        $helpText
                                                );
                                        }
-                               }
-                               break;
-                       case 'pagetypes':
-                               $theTypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
-                               foreach ($theTypes as $theTypeArrays) {
-                                       // Icon:
-                                       $icon = 'empty-emtpy';
-                                       if ($theTypeArrays[1] != '--div--') {
-                                               $icon = IconUtility::mapRecordTypeToSpriteIconName('pages', array('doktype' => $theTypeArrays[1]));
-                                       }
-                                       // Item configuration:
-                                       $items[] = array(
-                                               $this->sL($theTypeArrays[0]),
-                                               $theTypeArrays[1],
-                                               $icon
-                                       );
-                               }
-                               break;
-                       case 'exclude':
-                               $theTypes = BackendUtility::getExcludeFields();
-                               foreach ($theTypes as $theTypeArrays) {
-                                       list($theTable, $theFullField) = explode(':', $theTypeArrays[1]);
-                                       // If the field comes from a FlexForm, the syntax is more complex
-                                       $theFieldParts = explode(';', $theFullField);
-                                       $theField = array_pop($theFieldParts);
-                                       // Add header if not yet set for table:
-                                       if (!array_key_exists($theTable, $items)) {
-                                               $icon = IconUtility::mapRecordTypeToSpriteIconName($theTable, array());
-                                               $items[$theTable] = array(
-                                                       $this->sL($GLOBALS['TCA'][$theTable]['ctrl']['title']),
-                                                       '--div--',
-                                                       $icon
-                                               );
-                                       }
-                                       // Add help text
-                                       $helpText = array();
-                                       $GLOBALS['LANG']->loadSingleTableDescription($theTable);
-                                       $helpTextArray = $GLOBALS['TCA_DESCR'][$theTable]['columns'][$theFullField];
-                                       if (!empty($helpTextArray['description'])) {
-                                               $helpText['description'] = $helpTextArray['description'];
-                                       }
-                                       // Item configuration:
-                                       $items[] = array(
-                                               rtrim($GLOBALS['LANG']->sl($GLOBALS['TCA'][$theTable]['columns'][$theField]['label']), ':') . ' (' . $theField . ')',
-                                               $theTypeArrays[1],
-                                               'empty-empty',
-                                               $helpText
+                                       break;
+                               case 'explicitValues':
+                                       $theTypes = BackendUtility::getExplicitAuthFieldValues();
+                                       // Icons:
+                                       $icons = array(
+                                               'ALLOW' => 'status-status-permission-granted',
+                                               'DENY' => 'status-status-permission-denied'
                                        );
-                               }
-                               break;
-                       case 'explicitValues':
-                               $theTypes = BackendUtility::getExplicitAuthFieldValues();
-                               // Icons:
-                               $icons = array(
-                                       'ALLOW' => 'status-status-permission-granted',
-                                       'DENY' => 'status-status-permission-denied'
-                               );
-                               // Traverse types:
-                               foreach ($theTypes as $tableFieldKey => $theTypeArrays) {
-                                       if (is_array($theTypeArrays['items'])) {
-                                               // Add header:
-                                               $items[] = array(
-                                                       $theTypeArrays['tableFieldLabel'],
-                                                       '--div--'
-                                               );
-                                               // Traverse options for this field:
-                                               foreach ($theTypeArrays['items'] as $itemValue => $itemContent) {
-                                                       // Add item to be selected:
-                                                       $items[] = array(
-                                                               '[' . $itemContent[2] . '] ' . $itemContent[1],
-                                                               $tableFieldKey . ':' . preg_replace('/[:|,]/', '', $itemValue) . ':' . $itemContent[0],
-                                                               $icons[$itemContent[0]]
-                                                       );
-                                               }
-                                       }
-                               }
-                               break;
-                       case 'languages':
-                               $items = array_merge($items, BackendUtility::getSystemLanguages());
-                               break;
-                       case 'custom':
-                               // Initialize:
-                               $customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
-                               if (is_array($customOptions)) {
-                                       foreach ($customOptions as $coKey => $coValue) {
-                                               if (is_array($coValue['items'])) {
+                                       // Traverse types:
+                                       foreach ($theTypes as $tableFieldKey => $theTypeArrays) {
+                                               if (is_array($theTypeArrays['items'])) {
                                                        // Add header:
                                                        $items[] = array(
-                                                               $GLOBALS['LANG']->sl($coValue['header']),
+                                                               $theTypeArrays['tableFieldLabel'],
                                                                '--div--'
                                                        );
-                                                       // Traverse items:
-                                                       foreach ($coValue['items'] as $itemKey => $itemCfg) {
-                                                               // Icon:
-                                                               if ($itemCfg[1]) {
-                                                                       list($icon) = $this->getIcon($itemCfg[1]);
-                                                               } else {
-                                                                       $icon = 'empty-empty';
-                                                               }
-                                                               // Add help text
-                                                               $helpText = array();
-                                                               if (!empty($itemCfg[2])) {
-                                                                       $helpText['description'] = $GLOBALS['LANG']->sl($itemCfg[2]);
-                                                               }
+                                                       // Traverse options for this field:
+                                                       foreach ($theTypeArrays['items'] as $itemValue => $itemContent) {
                                                                // Add item to be selected:
                                                                $items[] = array(
-                                                                       $GLOBALS['LANG']->sl($itemCfg[0]),
-                                                                       $coKey . ':' . preg_replace('/[:|,]/', '', $itemKey),
-                                                                       $icon,
-                                                                       $helpText
+                                                                       '[' . $itemContent[2] . '] ' . $itemContent[1],
+                                                                       $tableFieldKey . ':' . preg_replace('/[:|,]/', '', $itemValue) . ':' . $itemContent[0],
+                                                                       $icons[$itemContent[0]]
                                                                );
                                                        }
                                                }
                                        }
-                               }
-                               break;
-                       case 'modListGroup':
-
-                       case 'modListUser':
-                               $loadModules = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
-                               $loadModules->load($GLOBALS['TBE_MODULES']);
-                               $modList = $fieldValue['config']['special'] == 'modListUser' ? $loadModules->modListUser : $loadModules->modListGroup;
-                               if (is_array($modList)) {
-                                       foreach ($modList as $theMod) {
-                                               // Icon:
-                                               $icon = $GLOBALS['LANG']->moduleLabels['tabs_images'][$theMod . '_tab'];
-                                               if ($icon) {
-                                                       $icon = '../' . substr($icon, strlen(PATH_site));
+                                       break;
+                               case 'languages':
+                                       $items = array_merge($items, BackendUtility::getSystemLanguages());
+                                       break;
+                               case 'custom':
+                                       // Initialize:
+                                       $customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
+                                       if (is_array($customOptions)) {
+                                               foreach ($customOptions as $coKey => $coValue) {
+                                                       if (is_array($coValue['items'])) {
+                                                               // Add header:
+                                                               $items[] = array(
+                                                                       $GLOBALS['LANG']->sl($coValue['header']),
+                                                                       '--div--'
+                                                               );
+                                                               // Traverse items:
+                                                               foreach ($coValue['items'] as $itemKey => $itemCfg) {
+                                                                       // Icon:
+                                                                       if ($itemCfg[1]) {
+                                                                               list($icon) = $this->getIcon($itemCfg[1]);
+                                                                       } else {
+                                                                               $icon = 'empty-empty';
+                                                                       }
+                                                                       // Add help text
+                                                                       $helpText = array();
+                                                                       if (!empty($itemCfg[2])) {
+                                                                               $helpText['description'] = $GLOBALS['LANG']->sl($itemCfg[2]);
+                                                                       }
+                                                                       // Add item to be selected:
+                                                                       $items[] = array(
+                                                                               $GLOBALS['LANG']->sl($itemCfg[0]),
+                                                                               $coKey . ':' . preg_replace('/[:|,]/', '', $itemKey),
+                                                                               $icon,
+                                                                               $helpText
+                                                                       );
+                                                               }
+                                                       }
                                                }
-                                               // Add help text
-                                               $helpText = array(
-                                                       'title' => $GLOBALS['LANG']->moduleLabels['labels'][$theMod . '_tablabel'],
-                                                       'description' => $GLOBALS['LANG']->moduleLabels['labels'][$theMod . '_tabdescr']
-                                               );
-                                               // Item configuration:
-                                               $items[] = array(
-                                                       $this->addSelectOptionsToItemArray_makeModuleData($theMod),
-                                                       $theMod,
-                                                       $icon,
-                                                       $helpText
-                                               );
                                        }
-                               }
-                               break;
+                                       break;
+                               case 'modListGroup':
+
+                               case 'modListUser':
+                                       $loadModules = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
+                                       $loadModules->load($GLOBALS['TBE_MODULES']);
+                                       $modList = $fieldValue['config']['special'] == 'modListUser' ? $loadModules->modListUser : $loadModules->modListGroup;
+                                       if (is_array($modList)) {
+                                               foreach ($modList as $theMod) {
+                                                       // Icon:
+                                                       $icon = $GLOBALS['LANG']->moduleLabels['tabs_images'][$theMod . '_tab'];
+                                                       if ($icon) {
+                                                               $icon = '../' . substr($icon, strlen(PATH_site));
+                                                       }
+                                                       // Add help text
+                                                       $helpText = array(
+                                                               'title' => $GLOBALS['LANG']->moduleLabels['labels'][$theMod . '_tablabel'],
+                                                               'description' => $GLOBALS['LANG']->moduleLabels['labels'][$theMod . '_tabdescr']
+                                                       );
+                                                       // Item configuration:
+                                                       $items[] = array(
+                                                               $this->addSelectOptionsToItemArray_makeModuleData($theMod),
+                                                               $theMod,
+                                                               $icon,
+                                                               $helpText
+                                                       );
+                                               }
+                                       }
+                                       break;
                        }
                }
                // Return the items:
@@ -5943,12 +5939,12 @@ function ' . $evalData . '(value) {
        public function getLL($str) {
                $content = '';
                switch (substr($str, 0, 2)) {
-               case 'l_':
-                       $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.' . substr($str, 2));
-                       break;
-               case 'm_':
-                       $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.' . substr($str, 2));
-                       break;
+                       case 'l_':
+                               $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.' . substr($str, 2));
+                               break;
+                       case 'm_':
+                               $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.' . substr($str, 2));
+                               break;
                }
                return $content;
        }
index 15a2fa5..f0751ca 100644 (file)
@@ -206,19 +206,19 @@ class RecordHistory {
                $cmdmapArray = array();
                if ($diff['insertsDeletes']) {
                        switch (count($rollbackData)) {
-                       case 1:
-                               // all tables
-                               $data = $diff['insertsDeletes'];
-                               break;
-                       case 2:
-                               // one record
-                               if ($diff['insertsDeletes'][$this->rollbackFields]) {
-                                       $data[$this->rollbackFields] = $diff['insertsDeletes'][$this->rollbackFields];
-                               }
-                               break;
-                       case 3:
-                               // one field in one record -- ignore!
-                               break;
+                               case 1:
+                                       // all tables
+                                       $data = $diff['insertsDeletes'];
+                                       break;
+                               case 2:
+                                       // one record
+                                       if ($diff['insertsDeletes'][$this->rollbackFields]) {
+                                               $data[$this->rollbackFields] = $diff['insertsDeletes'][$this->rollbackFields];
+                                       }
+                                       break;
+                               case 3:
+                                       // one field in one record -- ignore!
+                                       break;
                        }
                        if ($data) {
                                foreach ($data as $key => $action) {
@@ -257,18 +257,18 @@ class RecordHistory {
                        $diff_modified[$splitKey[0]][$splitKey[1]] = $value;
                }
                switch (count($rollbackData)) {
-               case 1:
-                       // all tables
-                       $data = $diff_modified;
-                       break;
-               case 2:
-                       // one record
-                       $data[$rollbackData[0]][$rollbackData[1]] = $diff_modified[$rollbackData[0]][$rollbackData[1]];
-                       break;
-               case 3:
-                       // one field in one record
-                       $data[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]] = $diff_modified[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]];
-                       break;
+                       case 1:
+                               // all tables
+                               $data = $diff_modified;
+                               break;
+                       case 2:
+                               // one record
+                               $data[$rollbackData[0]][$rollbackData[1]] = $diff_modified[$rollbackData[0]][$rollbackData[1]];
+                               break;
+                       case 3:
+                               // one field in one record
+                               $data[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]] = $diff_modified[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]];
+                               break;
                }
                // Removing fields:
                $data = $this->removeFilefields($rollbackData[0], $data);
@@ -725,14 +725,14 @@ class RecordHistory {
                                        }
                                        $hisDat = array();
                                        switch ($row['action']) {
-                                       case 1:
-                                               // Insert
-                                               $hisDat['action'] = 'insert';
-                                               break;
-                                       case 3:
-                                               // Delete
-                                               $hisDat['action'] = 'delete';
-                                               break;
+                                               case 1:
+                                                       // Insert
+                                                       $hisDat['action'] = 'insert';
+                                                       break;
+                                               case 3:
+                                                       // Delete
+                                                       $hisDat['action'] = 'delete';
+                                                       break;
                                        }
                                        $hisDat['tstamp'] = $row['tstamp'];
                                        $hisDat['user'] = $row['userid'];
index ad189be..f37300b 100644 (file)
@@ -320,14 +320,14 @@ abstract class AbstractRecordList {
                $content = '';
                $tParam = $table ? '&table=' . rawurlencode($table) : '';
                switch ($type) {
-               case 'fwd':
-                       $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
-                       $content = '<a href="' . htmlspecialchars($href) . '">' . IconUtility::getSpriteIcon('actions-move-up') . '</a> <i>[1 - ' . $pointer . ']</i>';
-                       break;
-               case 'rwd':
-                       $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
-                       $content = '<a href="' . htmlspecialchars($href) . '">' . IconUtility::getSpriteIcon('actions-move-down') . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
-                       break;
+                       case 'fwd':
+                               $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
+                               $content = '<a href="' . htmlspecialchars($href) . '">' . IconUtility::getSpriteIcon('actions-move-up') . '</a> <i>[1 - ' . $pointer . ']</i>';
+                               break;
+                       case 'rwd':
+                               $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
+                               $content = '<a href="' . htmlspecialchars($href) . '">' . IconUtility::getSpriteIcon('actions-move-down') . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
+                               break;
                }
                return $content;
        }
index 2b8e5c6..531bb8a 100644 (file)
@@ -693,12 +693,12 @@ class DocumentTemplate {
        public function formatTime($tstamp, $type) {
                $dateStr = '';
                switch ($type) {
-               case 1:
-                       $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $tstamp);
-                       break;
-               case 10:
-                       $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $tstamp);
-                       break;
+                       case 1:
+                               $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $tstamp);
+                               break;
+                       case 10:
+                               $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $tstamp);
+                               break;
                }
                return $dateStr;
        }
@@ -769,36 +769,35 @@ class DocumentTemplate {
                // Standard HTML tag
                $htmlTag = '<html xmlns="http://www.w3.org/1999/xhtml">';
                switch ($this->docType) {
-               case 'html_3':
-                       $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
-                       $htmlTag = '<html>';
-                       // Disable rendering of XHTML tags
-                       $this->getPageRenderer()->setRenderXhtml(FALSE);
-                       break;
-               case 'xhtml_strict':
-                       $headerStart = '<!DOCTYPE html
-       PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-                       break;
-               case 'xhtml_frames':
-                       $headerStart = '<!DOCTYPE html
-       PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
-                       break;
-               case 'xhtml_trans':
-                       $headerStart = '<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
-                       break;
-               case 'html5':
-
-               default:
-                       // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
-                       $headerStart = '<!DOCTYPE html>' . LF;
-                       $htmlTag = '<html>';
-                       // Disable rendering of XHTML tags
-                       $this->getPageRenderer()->setRenderXhtml(FALSE);
-                       break;
+                       case 'html_3':
+                               $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
+                               $htmlTag = '<html>';
+                               // Disable rendering of XHTML tags
+                               $this->getPageRenderer()->setRenderXhtml(FALSE);
+                               break;
+                       case 'xhtml_strict':
+                               $headerStart = '<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+                               break;
+                       case 'xhtml_frames':
+                               $headerStart = '<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
+                               break;
+                       case 'xhtml_trans':
+                               $headerStart = '<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+                               break;
+                       case 'html5':
+
+                       default:
+                               // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
+                               $headerStart = '<!DOCTYPE html>' . LF;
+                               $htmlTag = '<html>';
+                               // Disable rendering of XHTML tags
+                               $this->getPageRenderer()->setRenderXhtml(FALSE);
                }
                $this->pageRenderer->setHtmlTag($htmlTag);
                // This loads the tabulator-in-textarea feature. It automatically modifies
@@ -1314,20 +1313,20 @@ class DocumentTemplate {
         */
        public function icons($type, $styleAttribValue = '') {
                switch ($type) {
-               case self::STATUS_ICON_ERROR:
-                       $icon = 'status-dialog-error';
-                       break;
-               case self::STATUS_ICON_WARNING:
-                       $icon = 'status-dialog-warning';
-                       break;
-               case self::STATUS_ICON_NOTIFICATION:
-                       $icon = 'status-dialog-notification';
-                       break;
-               case self::STATUS_ICON_OK:
-                       $icon = 'status-dialog-ok';
-                       break;
-               default:
-                       break;
+                       case self::STATUS_ICON_ERROR:
+                               $icon = 'status-dialog-error';
+                               break;
+                       case self::STATUS_ICON_WARNING:
+                               $icon = 'status-dialog-warning';
+                               break;
+                       case self::STATUS_ICON_NOTIFICATION:
+                               $icon = 'status-dialog-notification';
+                               break;
+                       case self::STATUS_ICON_OK:
+                               $icon = 'status-dialog-ok';
+                               break;
+                       default:
+                               // Do nothing
                }
                if ($icon) {
                        return IconUtility::getSpriteIcon($icon);
index de33f35..609f9ac 100644 (file)
@@ -567,66 +567,66 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
         */
        protected function getShortcutIcon($row, $shortcut) {
                switch ($row['module_name']) {
-               case 'xMOD_alt_doc.php':
-                       $table = $shortcut['table'];
-                       $recordid = $shortcut['recordid'];
-                       if ($shortcut['type'] == 'edit') {
-                               // Creating the list of fields to include in the SQL query:
-                               $selectFields = $this->fieldArray;
-                               $selectFields[] = 'uid';
-                               $selectFields[] = 'pid';
-                               if ($table == 'pages') {
-                                       if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
-                                               $selectFields[] = 'module';
-                                               $selectFields[] = 'extendToSubpages';
+                       case 'xMOD_alt_doc.php':
+                               $table = $shortcut['table'];
+                               $recordid = $shortcut['recordid'];
+                               if ($shortcut['type'] == 'edit') {
+                                       // Creating the list of fields to include in the SQL query:
+                                       $selectFields = $this->fieldArray;
+                                       $selectFields[] = 'uid';
+                                       $selectFields[] = 'pid';
+                                       if ($table == 'pages') {
+                                               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
+                                                       $selectFields[] = 'module';
+                                                       $selectFields[] = 'extendToSubpages';
+                                               }
+                                               $selectFields[] = 'doktype';
                                        }
-                                       $selectFields[] = 'doktype';
-                               }
-                               if (is_array($GLOBALS['TCA'][$table]['ctrl']['enablecolumns'])) {
-                                       $selectFields = array_merge($selectFields, $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']);
-                               }
-                               if ($GLOBALS['TCA'][$table]['ctrl']['type']) {
-                                       $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['type'];
-                               }
-                               if ($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) {
-                                       $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
-                               }
-                               if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
-                                       $selectFields[] = 't3ver_state';
+                                       if (is_array($GLOBALS['TCA'][$table]['ctrl']['enablecolumns'])) {
+                                               $selectFields = array_merge($selectFields, $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']);
+                                       }
+                                       if ($GLOBALS['TCA'][$table]['ctrl']['type']) {
+                                               $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['type'];
+                                       }
+                                       if ($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) {
+                                               $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
+                                       }
+                                       if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
+                                               $selectFields[] = 't3ver_state';
+                                       }
+                                       // Unique list!
+                                       $selectFields = array_unique($selectFields);
+                                       $permissionClause = $table == 'pages' && $this->perms_clause ? ' AND ' . $this->perms_clause : '';
+                                       $sqlQueryParts = array(
+                                               'SELECT' => implode(',', $selectFields),
+                                               'FROM' => $table,
+                                               'WHERE' => 'uid IN (' . $recordid . ') ' . $permissionClause . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table)
+                                       );
+                                       $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($sqlQueryParts);
+                                       $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
+                                       $icon = IconUtility::getIcon($table, $row, $this->backPath);
+                               } elseif ($shortcut['type'] == 'new') {
+                                       $icon = IconUtility::getIcon($table, '', $this->backPath);
                                }
-                               // Unique list!
-                               $selectFields = array_unique($selectFields);
-                               $permissionClause = $table == 'pages' && $this->perms_clause ? ' AND ' . $this->perms_clause : '';
-                               $sqlQueryParts = array(
-                                       'SELECT' => implode(',', $selectFields),
-                                       'FROM' => $table,
-                                       'WHERE' => 'uid IN (' . $recordid . ') ' . $permissionClause . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table)
-                               );
-                               $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($sqlQueryParts);
-                               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
-                               $icon = IconUtility::getIcon($table, $row, $this->backPath);
-                       } elseif ($shortcut['type'] == 'new') {
-                               $icon = IconUtility::getIcon($table, '', $this->backPath);
-                       }
-                       $icon = IconUtility::skinImg($this->backPath, $icon, '', 1);
-                       break;
-               case 'xMOD_file_edit.php':
-                       $icon = 'gfx/edit_file.gif';
-                       break;
-               case 'xMOD_wizard_rte.php':
-                       $icon = 'gfx/edit_rtewiz.gif';
-                       break;
-               default:
-                       if ($GLOBALS['LANG']->moduleLabels['tabs_images'][$row['module_name'] . '_tab']) {
-                               $icon = $GLOBALS['LANG']->moduleLabels['tabs_images'][$row['module_name'] . '_tab'];
-                               // Change icon of fileadmin references - otherwise it doesn't differ with Web->List
-                               $icon = str_replace('mod/file/list/list.gif', 'mod/file/file.gif', $icon);
-                               if (GeneralUtility::isAbsPath($icon)) {
-                                       $icon = '../' . substr($icon, strlen(PATH_site));
+                               $icon = IconUtility::skinImg($this->backPath, $icon, '', 1);
+                               break;
+                       case 'xMOD_file_edit.php':
+                               $icon = 'gfx/edit_file.gif';
+                               break;
+                       case 'xMOD_wizard_rte.php':
+                               $icon = 'gfx/edit_rtewiz.gif';
+                               break;
+                       default:
+                               if ($GLOBALS['LANG']->moduleLabels['tabs_images'][$row['module_name'] . '_tab']) {
+                                       $icon = $GLOBALS['LANG']->moduleLabels['tabs_images'][$row['module_name'] . '_tab'];
+                                       // Change icon of fileadmin references - otherwise it doesn't differ with Web->List
+                                       $icon = str_replace('mod/file/list/list.gif', 'mod/file/file.gif', $icon);
+                                       if (GeneralUtility::isAbsPath($icon)) {
+                                               $icon = '../' . substr($icon, strlen(PATH_site));
+                                       }
+                               } else {
+                                       $icon = 'gfx/dummy_module.gif';
                                }
-                       } else {
-                               $icon = 'gfx/dummy_module.gif';
-                       }
                }
                return '<img src="' . $icon . '" alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.shortcut', TRUE) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.shortcut', TRUE) . '" />';
        }
index e76b550..469b026 100644 (file)
@@ -559,19 +559,19 @@ class BackendUtility {
                                                                        // Find iMode
                                                                        $iMode = '';
                                                                        switch ((string) $fCfg['authMode']) {
-                                                                       case 'explicitAllow':
-                                                                               $iMode = 'ALLOW';
-                                                                               break;
-                                                                       case 'explicitDeny':
-                                                                               $iMode = 'DENY';
-                                                                               break;
-                                                                       case 'individual':
-                                                                               if (!strcmp($iVal[4], 'EXPL_ALLOW')) {
+                                                                               case 'explicitAllow':
                                                                                        $iMode = 'ALLOW';
-                                                                               } elseif (!strcmp($iVal[4], 'EXPL_DENY')) {
+                                                                                       break;
+                                                                               case 'explicitDeny':
                                                                                        $iMode = 'DENY';
-                                                                               }
-                                                                               break;
+                                                                                       break;
+                                                                               case 'individual':
+                                                                                       if (!strcmp($iVal[4], 'EXPL_ALLOW')) {
+                                                                                               $iMode = 'ALLOW';
+                                                                                       } elseif (!strcmp($iVal[4], 'EXPL_DENY')) {
+                                                                                               $iMode = 'DENY';
+                                                                                       }
+                                                                                       break;
                                                                        }
                                                                        // Set iMode
                                                                        if ($iMode) {
@@ -1613,21 +1613,21 @@ class BackendUtility {
                        $parts[] = 'v#1.' . $row['t3ver_id'];
                }
                switch ($row['t3ver_state']) {
-               case 1:
-                       $parts[] = 'PLH WSID#' . $row['t3ver_wsid'];
-                       break;
-               case 2:
-                       $parts[] = 'Deleted element!';
-                       break;
-               case 3:
-                       $parts[] = 'NEW LOCATION (PLH) WSID#' . $row['t3ver_wsid'];
-                       break;
-               case 4:
-                       $parts[] = 'OLD LOCATION (PNT) WSID#' . $row['t3ver_wsid'];
-                       break;
-               case -1:
-                       $parts[] = 'New element!';
-                       break;
+                       case 1:
+                               $parts[] = 'PLH WSID#' . $row['t3ver_wsid'];
+                               break;
+                       case 2:
+                               $parts[] = 'Deleted element!';
+                               break;
+                       case 3:
+                               $parts[] = 'NEW LOCATION (PLH) WSID#' . $row['t3ver_wsid'];
+                               break;
+                       case 4:
+                               $parts[] = 'OLD LOCATION (PNT) WSID#' . $row['t3ver_wsid'];
+                               break;
+                       case -1:
+                               $parts[] = 'New element!';
+                               break;
                }
                if ($row['doktype'] == PageRepository::DOKTYPE_LINK) {
                        $parts[] = $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns']['url']['label']) . ' ' . $row['url'];
@@ -1708,21 +1708,21 @@ class BackendUtility {
                        }
                        if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                switch ($row['t3ver_state']) {
-                               case 1:
-                                       $out .= ' - PLH WSID#' . $row['t3ver_wsid'];
-                                       break;
-                               case 2:
-                                       $out .= ' - Deleted element!';
-                                       break;
-                               case 3:
-                                       $out .= ' - NEW LOCATION (PLH) WSID#' . $row['t3ver_wsid'];
-                                       break;
-                               case 4:
-                                       $out .= ' - OLD LOCATION (PNT)  WSID#' . $row['t3ver_wsid'];
-                                       break;
-                               case -1:
-                                       $out .= ' - New element!';
-                                       break;
+                                       case 1:
+                                               $out .= ' - PLH WSID#' . $row['t3ver_wsid'];
+                                               break;
+                                       case 2:
+                                               $out .= ' - Deleted element!';
+                                               break;
+                                       case 3:
+                                               $out .= ' - NEW LOCATION (PLH) WSID#' . $row['t3ver_wsid'];
+                                               break;
+                                       case 4:
+                                               $out .= ' - OLD LOCATION (PNT)  WSID#' . $row['t3ver_wsid'];
+                                               break;
+                                       case -1:
+                                               $out .= ' - New element!';
+                                               break;
                                }
                        }
                        // Hidden
@@ -1977,35 +1977,38 @@ class BackendUtility {
                        }
                        $l = '';
                        switch ((string) $theColConf['type']) {
-                       case 'radio':
-                               $l = self::getLabelFromItemlist($table, $col, $value);
-                               $l = $GLOBALS['LANG']->sL($l);
-                               break;
-                       case 'select':
-                               if ($theColConf['MM']) {
-                                       if ($uid) {
-                                               // Display the title of MM related records in lists
-                                               if ($noRecordLookup) {
-                                                       $MMfield = $theColConf['foreign_table'] . '.uid';
-                                               } else {
-                                                       $MMfields = array($theColConf['foreign_table'] . '.' . $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label']);
-                                                       foreach (GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label_alt'], 1) as $f) {
-                                                               $MMfields[] = $theColConf['foreign_table'] . '.' . $f;
-                                                       }
-                                                       $MMfield = join(',', $MMfields);
-                                               }
-                                               /** @var $dbGroup \TYPO3\CMS\Core\Database\RelationHandler */
-                                               $dbGroup = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
-                                               $dbGroup->start($value, $theColConf['foreign_table'], $theColConf['MM'], $uid, $table, $theColConf);
-                                               $selectUids = $dbGroup->tableArray[$theColConf['foreign_table']];
-                                               if (is_array($selectUids) && count($selectUids) > 0) {
-                                                       $MMres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, ' . $MMfield, $theColConf['foreign_table'], 'uid IN (' . implode(',', $selectUids) . ')' . self::deleteClause($theColConf['foreign_table']));
-                                                       while ($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
-                                                               $mmlA[] = $noRecordLookup ? $MMrow['uid'] : self::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult);
+                               case 'radio':
+                                       $l = self::getLabelFromItemlist($table, $col, $value);
+                                       $l = $GLOBALS['LANG']->sL($l);
+                                       break;
+                               case 'select':
+                                       if ($theColConf['MM']) {
+                                               if ($uid) {
+                                                       // Display the title of MM related records in lists
+                                                       if ($noRecordLookup) {
+                                                               $MMfield = $theColConf['foreign_table'] . '.uid';
+                                                       } else {
+                                                               $MMfields = array($theColConf['foreign_table'] . '.' . $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label']);
+                                                               foreach (GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label_alt'], 1) as $f) {
+                                                                       $MMfields[] = $theColConf['foreign_table'] . '.' . $f;
+                                                               }
+                                                               $MMfield = join(',', $MMfields);
                                                        }
-                                                       $GLOBALS['TYPO3_DB']->sql_free_result($MMres);
-                                                       if (is_array($mmlA)) {
-                                                               $l = implode('; ', $mmlA);
+                                                       /** @var $dbGroup \TYPO3\CMS\Core\Database\RelationHandler */
+                                                       $dbGroup = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                                       $dbGroup->start($value, $theColConf['foreign_table'], $theColConf['MM'], $uid, $table, $theColConf);
+                                                       $selectUids = $dbGroup->tableArray[$theColConf['foreign_table']];
+                                                       if (is_array($selectUids) && count($selectUids) > 0) {
+                                                               $MMres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, ' . $MMfield, $theColConf['foreign_table'], 'uid IN (' . implode(',', $selectUids) . ')' . self::deleteClause($theColConf['foreign_table']));
+                                                               while ($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
+                                                                       $mmlA[] = $noRecordLookup ? $MMrow['uid'] : self::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult);
+                                                               }
+                                                               $GLOBALS['TYPO3_DB']->sql_free_result($MMres);
+                                                               if (is_array($mmlA)) {
+                                                                       $l = implode('; ', $mmlA);
+                                                               } else {
+                                                                       $l = 'N/A';
+                                                               }
                                                        } else {
                                                                $l = 'N/A';
                                                        }
@@ -2013,119 +2016,115 @@ class BackendUtility {
                                                        $l = 'N/A';
                                                }
                                        } else {
-                                               $l = 'N/A';
-                                       }
-                               } else {
-                                       $l = self::getLabelsFromItemsList($table, $col, $value);
-                                       if ($theColConf['foreign_table'] && !$l && $GLOBALS['TCA'][$theColConf['foreign_table']]) {
-                                               if ($noRecordLookup) {
-                                                       $l = $value;
-                                               } else {
-                                                       $rParts = GeneralUtility::trimExplode(',', $value, 1);
-                                                       $lA = array();
-                                                       foreach ($rParts as $rVal) {
-                                                               $rVal = intval($rVal);
-                                                               if ($rVal > 0) {
-                                                                       $r = self::getRecordWSOL($theColConf['foreign_table'], $rVal);
-                                                               } else {
-                                                                       $r = self::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal);
-                                                               }
-                                                               if (is_array($r)) {
-                                                                       $lA[] = $GLOBALS['LANG']->sL(($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix'])) . self::getRecordTitle(($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table']), $r, FALSE, $forceResult);
-                                                               } else {
-                                                                       $lA[] = $rVal ? '[' . $rVal . '!]' : '';
+                                               $l = self::getLabelsFromItemsList($table, $col, $value);
+                                               if ($theColConf['foreign_table'] && !$l && $GLOBALS['TCA'][$theColConf['foreign_table']]) {
+                                                       if ($noRecordLookup) {
+                                                               $l = $value;
+                                                       } else {
+                                                               $rParts = GeneralUtility::trimExplode(',', $value, 1);
+                                                               $lA = array();
+                                                               foreach ($rParts as $rVal) {
+                                                                       $rVal = intval($rVal);
+                                                                       if ($rVal > 0) {
+                                                                               $r = self::getRecordWSOL($theColConf['foreign_table'], $rVal);
+                                                                       } else {
+                                                                               $r = self::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal);
+                                                                       }
+                                                                       if (is_array($r)) {
+                                                                               $lA[] = $GLOBALS['LANG']->sL(($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix'])) . self::getRecordTitle(($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table']), $r, FALSE, $forceResult);
+                                                                       } else {
+                                                                               $lA[] = $rVal ? '[' . $rVal . '!]' : '';
+                                                                       }
                                                                }
+                                                               $l = implode(', ', $lA);
                                                        }
-                                                       $l = implode(', ', $lA);
                                                }
                                        }
-                               }
-                               break;
-                       case 'group':
-                               // resolve the titles for DB records
-                               if ($theColConf['internal_type'] === 'db') {
-                                       $finalValues = array();
-                                       $relationTableName = $theColConf['allowed'];
-                                       $explodedValues = GeneralUtility::trimExplode(',', $value, TRUE);
+                                       break;
+                               case 'group':
+                                       // resolve the titles for DB records
+                                       if ($theColConf['internal_type'] === 'db') {
+                                               $finalValues = array();
+                                               $relationTableName = $theColConf['allowed'];
+                                               $explodedValues = GeneralUtility::trimExplode(',', $value, TRUE);
 
-                                       foreach ($explodedValues as $explodedValue) {
+                                               foreach ($explodedValues as $explodedValue) {
 
-                                               if (MathUtility::canBeInterpretedAsInteger($explodedValue)) {
-                                                       $relationTableNameForField = $relationTableName;
-                                               } else {
-                                                       list($relationTableNameForField, $explodedValue) = self::splitTable_Uid($explodedValue);
+                                                       if (MathUtility::canBeInterpretedAsInteger($explodedValue)) {
+                                                               $relationTableNameForField = $relationTableName;
+                                                       } else {
+                                                               list($relationTableNameForField, $explodedValue) = self::splitTable_Uid($explodedValue);
+                                                       }
+
+                                                       $relationRecord = static::getRecordWSOL($relationTableNameForField, $explodedValue);
+                                                       $finalValues[] = static::getRecordTitle($relationTableNameForField, $relationRecord);
                                                }
 
-                                               $relationRecord = static::getRecordWSOL($relationTableNameForField, $explodedValue);
-                                               $finalValues[] = static::getRecordTitle($relationTableNameForField, $relationRecord);
+                                               $l = implode(', ', $finalValues);
+                                       } else {
+                                               $l = implode(', ', GeneralUtility::trimExplode(',', $value, TRUE));
                                        }
-
-                                       $l = implode(', ', $finalValues);
-                               } else {
-                                       $l = implode(', ', GeneralUtility::trimExplode(',', $value, TRUE));
-                               }
-                               break;
-                       case 'check':
-                               if (!is_array($theColConf['items']) || count($theColConf['items']) == 1) {
-                                       $l = $value ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:yes') : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:no');
-                               } else {
-                                       $lA = array();
-                                       foreach ($theColConf['items'] as $key => $val) {
-                                               if ($value & pow(2, $key)) {
-                                                       $lA[] = $GLOBALS['LANG']->sL($val[0]);
+                                       break;
+                               case 'check':
+                                       if (!is_array($theColConf['items']) || count($theColConf['items']) == 1) {
+                                               $l = $value ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:yes') : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:no');
+                                       } else {
+                                               $lA = array();
+                                               foreach ($theColConf['items'] as $key => $val) {
+                                                       if ($value & pow(2, $key)) {
+                                                               $lA[] = $GLOBALS['LANG']->sL($val[0]);
+                                                       }
                                                }
+                                               $l = implode(', ', $lA);
                                        }
-                                       $l = implode(', ', $lA);
-                               }
-                               break;
-                       case 'input':
-                               // Hide value 0 for dates, but show it for everything else
-                               if (isset($value)) {
-                                       if (GeneralUtility::inList($theColConf['eval'], 'date')) {
-                                               // Handle native date field
-                                               if (isset($theColConf['dbType']) && $theColConf['dbType'] === 'date') {
-                                                       $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
-                                                       $emptyValue = $dateTimeFormats['date']['empty'];
-                                                       $value = $value !== $emptyValue ? strtotime($value) : 0;
-                                               }
-                                               if (!empty($value)) {
-                                                       $l = self::date($value) . ' (' . ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') . self::calcAge(abs(($GLOBALS['EXEC_TIME'] - $value)), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) . ')';
-                                               }
-                                       } elseif (GeneralUtility::inList($theColConf['eval'], 'time')) {
-                                               if (!empty($value)) {
-                                                       $l = self::time($value, FALSE);
-                                               }
-                                       } elseif (GeneralUtility::inList($theColConf['eval'], 'timesec')) {
-                                               if (!empty($value)) {
-                                                       $l = self::time($value);
-                                               }
-                                       } elseif (GeneralUtility::inList($theColConf['eval'], 'datetime')) {
-                                               // Handle native date/time field
-                                               if (isset($theColConf['dbType']) && $theColConf['dbType'] === 'datetime') {
-                                                       $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
-                                                       $emptyValue = $dateTimeFormats['datetime']['empty'];
-                                                       $value = $value !== $emptyValue ? strtotime($value) : 0;
-                                               }
-                                               if (!empty($value)) {
-                                                       $l = self::datetime($value);
+                                       break;
+                               case 'input':
+                                       // Hide value 0 for dates, but show it for everything else
+                                       if (isset($value)) {
+                                               if (GeneralUtility::inList($theColConf['eval'], 'date')) {
+                                                       // Handle native date field
+                                                       if (isset($theColConf['dbType']) && $theColConf['dbType'] === 'date') {
+                                                               $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
+                                                               $emptyValue = $dateTimeFormats['date']['empty'];
+                                                               $value = $value !== $emptyValue ? strtotime($value) : 0;
+                                                       }
+                                                       if (!empty($value)) {
+                                                               $l = self::date($value) . ' (' . ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') . self::calcAge(abs(($GLOBALS['EXEC_TIME'] - $value)), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) . ')';
+                                                       }
+                                               } elseif (GeneralUtility::inList($theColConf['eval'], 'time')) {
+                                                       if (!empty($value)) {
+                                                               $l = self::time($value, FALSE);
+                                                       }
+                                               } elseif (GeneralUtility::inList($theColConf['eval'], 'timesec')) {
+                                                       if (!empty($value)) {
+                                                               $l = self::time($value);
+                                                       }
+                                               } elseif (GeneralUtility::inList($theColConf['eval'], 'datetime')) {
+                                                       // Handle native date/time field
+                                                       if (isset($theColConf['dbType']) && $theColConf['dbType'] === 'datetime') {
+                                                               $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
+                                                               $emptyValue = $dateTimeFormats['datetime']['empty'];
+                                                               $value = $value !== $emptyValue ? strtotime($value) : 0;
+                                                       }
+                                                       if (!empty($value)) {
+                                                               $l = self::datetime($value);
+                                                       }
+                                               } else {
+                                                       $l = $value;
                                                }
-                                       } else {
+                                       }
+                                       break;
+                               case 'flex':
+                                       $l = strip_tags($value);
+                                       break;
+                               default:
+                                       if ($defaultPassthrough) {
                                                $l = $value;
+                                       } elseif ($theColConf['MM']) {
+                                               $l = 'N/A';
+                                       } elseif ($value) {
+                                               $l = GeneralUtility::fixed_lgd_cs(strip_tags($value), 200);
                                        }
-                               }
-                               break;
-                       case 'flex':
-                               $l = strip_tags($value);
-                               break;
-                       default:
-                               if ($defaultPassthrough) {
-                                       $l = $value;
-                               } elseif ($theColConf['MM']) {
-                                       $l = 'N/A';
-                               } elseif ($value) {
-                                       $l = GeneralUtility::fixed_lgd_cs(strip_tags($value), 200);
-                               }
-                               break;
                        }
                        // If this field is a password field, then hide the password by changing it to a random number of asterisk (*)
                        if (stristr($theColConf['eval'], 'password')) {
@@ -2267,27 +2266,26 @@ class BackendUtility {
                                        $lines[$fname] = '<strong>' . htmlspecialchars($config[1]) . '</strong><br />';
                                        $lines[$fname] .= $config[2] . '<br />';
                                        switch ($config[0]) {
-                                       case 'string':
+                                               case 'string':
 
-                                       case 'short':
-                                               $formEl = '<input type="text" name="' . $dataPrefix . '[' . $fname . ']" value="' . $params[$fname] . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(($config[0] == 'short' ? 24 : 48)) . ' />';
-                                               break;
-                                       case 'check':
-                                               $formEl = '<input type="hidden" name="' . $dataPrefix . '[' . $fname . ']" value="0" /><input type="checkbox" name="' . $dataPrefix . '[' . $fname . ']" value="1"' . ($params[$fname] ? ' checked="checked"' : '') . ' />';
-                                               break;
-                                       case 'comment':
-                                               $formEl = '';
-                                               break;
-                                       case 'select':
-                                               $opt = array();
-                                               foreach ($config[3] as $k => $v) {
-                                                       $opt[] = '<option value="' . htmlspecialchars($k) . '"' . ($params[$fname] == $k ? ' selected="selected"' : '') . '>' . htmlspecialchars($v) . '</option>';
-                                               }
-                                               $formEl = '<select name="' . $dataPrefix . '[' . $fname . ']">' . implode('', $opt) . '</select>';
-                                               break;
-                                       default:
-                                               debug($config);
-                                               break;
+                                               case 'short':
+                                                       $formEl = '<input type="text" name="' . $dataPrefix . '[' . $fname . ']" value="' . $params[$fname] . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(($config[0] == 'short' ? 24 : 48)) . ' />';
+                                                       break;
+                                               case 'check':
+                                                       $formEl = '<input type="hidden" name="' . $dataPrefix . '[' . $fname . ']" value="0" /><input type="checkbox" name="' . $dataPrefix . '[' . $fname . ']" value="1"' . ($params[$fname] ? ' checked="checked"' : '') . ' />';
+                                                       break;
+                                               case 'comment':
+                                                       $formEl = '';
+                                                       break;
+                                               case 'select':
+                                                       $opt = array();
+                                                       foreach ($config[3] as $k => $v) {
+                                                               $opt[] = '<option value="' . htmlspecialchars($k) . '"' . ($params[$fname] == $k ? ' selected="selected"' : '') . '>' . htmlspecialchars($v) . '</option>';
+                                                       }
+                                                       $formEl = '<select name="' . $dataPrefix . '[' . $fname . ']">' . implode('', $opt) . '</select>';
+                                                       break;
+                                               default:
+                                                       debug($config);
                                        }
                                        $lines[$fname] .= $formEl;
                                        $lines[$fname] .= '<br /><br />';
@@ -2791,25 +2789,24 @@ class BackendUtility {
                                $signals[] = $params['JScode'];
                        } else {
                                switch ($set) {
-                               case 'updatePageTree':
-                                       $signals[] = '
-                                                       if (top && top.TYPO3.Backend.NavigationContainer.PageTree) {
-                                                               top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
-                                                       }
-                                               ';
-                                       break;
-                               case 'updateFolderTree':
-                                       $signals[] = '
-                                                       if (top && top.TYPO3.Backend.NavigationIframe) {
-                                                               top.TYPO3.Backend.NavigationIframe.refresh();
-                                                       }';
-                                       break;
-                               case 'updateModuleMenu':
-                                       $signals[] = '
-                                                       if (top && top.TYPO3.ModuleMenu.App) {
-                                                               top.TYPO3.ModuleMenu.App.refreshMenu();
-                                                       }';
-                                       break;
+                                       case 'updatePageTree':
+                                               $signals[] = '
+                                                               if (top && top.TYPO3.Backend.NavigationContainer.PageTree) {
+                                                                       top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
+                                                               }
+                                                       ';
+                                               break;
+                                       case 'updateFolderTree':
+                                               $signals[] = '
+                                                               if (top && top.TYPO3.Backend.NavigationIframe) {
+                                                                       top.TYPO3.Backend.NavigationIframe.refresh();
+                                                               }';
+                                               break;
+                                       case 'updateModuleMenu':
+                                               $signals[] = '
+                                                               if (top && top.TYPO3.ModuleMenu.App) {
+                                                                       top.TYPO3.ModuleMenu.App.refreshMenu();
+                                                               }';
                                }
                        }
                }
@@ -3854,11 +3851,11 @@ class BackendUtility {
                        // Cleanup command, if set
                        $cmd = GeneralUtility::_GET('adminWarning_cmd');
                        switch ($cmd) {
-                       case 'remove_ENABLE_INSTALL_TOOL':
-                               if (unlink($enableInstallToolFile)) {
-                                       unset($enableInstallToolFile);
-                               }
-                               break;
+                               case 'remove_ENABLE_INSTALL_TOOL':
+                                       if (unlink($enableInstallToolFile)) {
+                                               unset($enableInstallToolFile);
+                                       }
+                                       break;
                        }
                        // Check if the Install Tool Password is still default: joh316
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] == md5('joh316')) {
@@ -4043,14 +4040,13 @@ class BackendUtility {
                        $interface = $GLOBALS['BE_USER']->uc['interfaceSetup'];
                }
                switch ($interface) {
-               case 'frontend':
-                       $script = '../.';
-                       break;
-               case 'backend':
-
-               default:
-                       $script = 'backend.php';
-                       break;
+                       case 'frontend':
+                               $script = '../.';
+                               break;
+                       case 'backend':
+
+                       default:
+                               $script = 'backend.php';
                }
                return $script;
        }
index 3fcf734..2e16c60 100644 (file)
@@ -156,18 +156,18 @@ class IconUtility {
                // Shadow
                if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        switch ((int) $row['t3ver_state']) {
-                       case 1:
-                               return 'gfx/i/shadow_hide.png';
-                               break;
-                       case 2:
-                               return 'gfx/i/shadow_delete.png';
-                               break;
-                       case 3:
-                               return 'gfx/i/shadow_moveto_plh.png';
-                               break;
-                       case 4:
-                               return 'gfx/i/shadow_moveto_pointer.png';
-                               break;
+                               case 1:
+                                       return 'gfx/i/shadow_hide.png';
+                                       break;
+                               case 2:
+                                       return 'gfx/i/shadow_delete.png';
+                                       break;
+                               case 3:
+                                       return 'gfx/i/shadow_moveto_plh.png';
+                                       break;
+                               case 4:
+                                       return 'gfx/i/shadow_moveto_pointer.png';
+                                       break;
                        }
                }
                // First, find the icon file name. This can depend on configuration in TCA, field values and more:
@@ -349,15 +349,15 @@ class IconUtility {
                // Return icon source/wHattributes:
                $output = '';
                switch ($outputMode) {
-               case 0:
-                       $output = ' src="' . $backPath . $src . '" ' . $wHattribs;
-                       break;
-               case 1:
-                       $output = $backPath . $src;
-                       break;
-               case 2:
-                       $output = $wHattribs;
-                       break;
+                       case 0:
+                               $output = ' src="' . $backPath . $src . '" ' . $wHattribs;
+                               break;
+                       case 1:
+                               $output = $backPath . $src;
+                               break;
+                       case 2:
+                               $output = $wHattribs;
+                               break;
                }
                $cachedSkinImages[$imageId] = $output;
                return $output;
@@ -429,30 +429,29 @@ class IconUtility {
                                        if ($mode) {
                                                unset($ol_im);
                                                switch ($mode) {
-                                               case 'deleted':
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_deleted.gif');
-                                                       break;
-                                               case 'futuretiming':
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
-                                                       break;
-                                               case 'timing':
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
-                                                       break;
-                                               case 'hiddentiming':
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden_timing.gif');
-                                                       break;
-                                               case 'no_icon_found':
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_no_icon_found.gif');
-                                                       break;
-                                               case 'disabled':
-                                                       // is already greyed - nothing more
-                                                       $ol_im = 0;
-                                                       break;
-                                               case 'hidden':
+                                                       case 'deleted':
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_deleted.gif');
+                                                               break;
+                                                       case 'futuretiming':
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
+                                                               break;
+                                                       case 'timing':
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_timing.gif');
+                                                               break;
+                                                       case 'hiddentiming':
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden_timing.gif');
+                                                               break;
+                                                       case 'no_icon_found':
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_no_icon_found.gif');
+                                                               break;
+                                                       case 'disabled':
+                                                               // is already greyed - nothing more
+                                                               $ol_im = 0;
+                                                               break;
+                                                       case 'hidden':
 
-                                               default:
-                                                       $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden.gif');
-                                                       break;
+                                                       default:
+                                                               $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'gfx/overlay_hidden.gif');
                                                }
                                                if ($ol_im < 0) {
                                                        return $iconfile;
index 9b45ac0..c88a1a0 100644 (file)
@@ -194,12 +194,12 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                } else {
                        // Branch out based on table name:
                        switch ($table) {
-                       case 'pages':
-                               return $this->getTable_pages($id);
-                               break;
-                       case 'tt_content':
-                               return $this->getTable_tt_content($id);
-                               break;
+                               case 'pages':
+                                       return $this->getTable_pages($id);
+                                       break;
+                               case 'tt_content':
+                                       return $this->getTable_tt_content($id);
+                                       break;
                        }
                }
        }
@@ -255,17 +255,16 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        // Select which fields to show:
                        $pKey = $GLOBALS['SOBE']->MOD_SETTINGS['pages'];
                        switch ($pKey) {
-                       case 1:
-                               $this->cleanTableNames();
-                               $tableNames = $this->allowedTableNames;
-                               $this->fieldArray = explode(',', 'title,uid,' . implode(',', array_keys($tableNames)));
-                               break;
-                       case 2:
-                               $this->fieldArray = explode(',', 'title,uid,lastUpdated,newUntil,no_cache,cache_timeout,php_tree_stop,TSconfig,storage_pid,is_siteroot,fe_login_mode');
-                               break;
-                       default:
-                               $this->fieldArray = explode(',', 'title,uid,alias,starttime,endtime,fe_group,target,url,shortcut,shortcut_mode');
-                               break;
+                               case 1:
+                                       $this->cleanTableNames();
+                                       $tableNames = $this->allowedTableNames;
+                                       $this->fieldArray = explode(',', 'title,uid,' . implode(',', array_keys($tableNames)));
+                                       break;
+                               case 2:
+                                       $this->fieldArray = explode(',', 'title,uid,lastUpdated,newUntil,no_cache,cache_timeout,php_tree_stop,TSconfig,storage_pid,is_siteroot,fe_login_mode');
+                                       break;
+                               default:
+                                       $this->fieldArray = explode(',', 'title,uid,alias,starttime,endtime,fe_group,target,url,shortcut,shortcut_mode');
                        }
                        // Getting select-depth:
                        $depth = intval($GLOBALS['SOBE']->MOD_SETTINGS['pages_levels']);
@@ -312,22 +311,21 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        $eI = '';
                                }
                                switch ($field) {
-                               case 'title':
-                                       $theData[$field] = '&nbsp;<strong>' . $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns'][$field]['label']) . '</strong>' . $eI;
-                                       break;
-                               case 'uid':
-                                       $theData[$field] = '&nbsp;<strong>ID:</strong>';
-                                       break;
-                               default:
-                                       if (substr($field, 0, 6) == 'table_') {
-                                               $f2 = substr($field, 6);
-                                               if ($GLOBALS['TCA'][$f2]) {
-                                                       $theData[$field] = '&nbsp;' . IconUtility::getSpriteIconForRecord($f2, array(), array('title' => $GLOBALS['LANG']->sL($GLOBALS['TCA'][$f2]['ctrl']['title'], 1)));
+                                       case 'title':
+                                               $theData[$field] = '&nbsp;<strong>' . $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns'][$field]['label']) . '</strong>' . $eI;
+                                               break;
+                                       case 'uid':
+                                               $theData[$field] = '&nbsp;<strong>ID:</strong>';
+                                               break;
+                                       default:
+                                               if (substr($field, 0, 6) == 'table_') {
+                                                       $f2 = substr($field, 6);
+                                                       if ($GLOBALS['TCA'][$f2]) {
+                                                               $theData[$field] = '&nbsp;' . IconUtility::getSpriteIconForRecord($f2, array(), array('title' => $GLOBALS['LANG']->sL($GLOBALS['TCA'][$f2]['ctrl']['title'], 1)));
+                                                       }
+                                               } else {
+                                                       $theData[$field] = '&nbsp;&nbsp;<strong>' . $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns'][$field]['label'], 1) . '</strong>' . $eI;
                                                }
-                                       } else {
-                                               $theData[$field] = '&nbsp;&nbsp;<strong>' . $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns'][$field]['label'], 1) . '</strong>' . $eI;
-                                       }
-                                       break;
                                }
                        }
                        // Start table:
@@ -1039,39 +1037,38 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                $theData = array();
                foreach ($fieldArr as $field) {
                        switch ($field) {
-                       case 'title':
-                               $red = $this->plusPages[$row['uid']] ? '<font color="red"><strong>+&nbsp;</strong></font>' : '';
-                               $pTitle = htmlspecialchars(BackendUtility::getProcessedValue('pages', $field, $row[$field], 20));
-                               if ($red) {
-                                       $pTitle = '<a href="' . htmlspecialchars(($this->script . '?id=' . $row['uid'])) . '">' . $pTitle . '</a>';
-                               }
-                               $theData[$field] = $row['treeIcons'] . $theIcon . $red . $pTitle . '&nbsp;&nbsp;';
-                               break;
-                       case 'php_tree_stop':
-
-                       case 'TSconfig':
-                               $theData[$field] = $row[$field] ? '&nbsp;<strong>x</strong>' : '&nbsp;';
-                               break;
-                       case 'uid':
-                               if ($GLOBALS['BE_USER']->doesUserHaveAccess($row, 2)) {
-                                       $params = '&edit[pages][' . $row['uid'] . ']=edit';
-                                       $eI = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, $this->backPath, '')) . '" title="' . $GLOBALS['LANG']->getLL('editThisPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
-                               } else {
-                                       $eI = '';
-                               }
-                               $theData[$field] = '<span align="right">' . $row['uid'] . $eI . '</span>';
-                               break;
-                       default:
-                               if (substr($field, 0, 6) == 'table_') {
-                                       $f2 = substr($field, 6);
-                                       if ($GLOBALS['TCA'][$f2]) {
-                                               $c = $this->numberOfRecords($f2, $row['uid']);
-                                               $theData[$field] = '&nbsp;&nbsp;' . ($c ? $c : '');
+                               case 'title':
+                                       $red = $this->plusPages[$row['uid']] ? '<font color="red"><strong>+&nbsp;</strong></font>' : '';
+                                       $pTitle = htmlspecialchars(BackendUtility::getProcessedValue('pages', $field, $row[$field], 20));
+                                       if ($red) {
+                                               $pTitle = '<a href="' . htmlspecialchars(($this->script . '?id=' . $row['uid'])) . '">' . $pTitle . '</a>';
+                                       }
+                                       $theData[$field] = $row['treeIcons'] . $theIcon . $red . $pTitle . '&nbsp;&nbsp;';
+                                       break;
+                               case 'php_tree_stop':
+
+                               case 'TSconfig':
+                                       $theData[$field] = $row[$field] ? '&nbsp;<strong>x</strong>' : '&nbsp;';
+                                       break;
+                               case 'uid':
+                                       if ($GLOBALS['BE_USER']->doesUserHaveAccess($row, 2)) {
+                                               $params = '&edit[pages][' . $row['uid'] . ']=edit';
+                                               $eI = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, $this->backPath, '')) . '" title="' . $GLOBALS['LANG']->getLL('editThisPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
+                                       } else {
+                                               $eI = '';
+                                       }
+                                       $theData[$field] = '<span align="right">' . $row['uid'] . $eI . '</span>';
+                                       break;
+                               default:
+                                       if (substr($field, 0, 6) == 'table_') {
+                                               $f2 = substr($field, 6);
+                                               if ($GLOBALS['TCA'][$f2]) {
+                                                       $c = $this->numberOfRecords($f2, $row['uid']);
+                                                       $theData[$field] = '&nbsp;&nbsp;' . ($c ? $c : '');
+                                               }
+                                       } else {
+                                               $theData[$field] = '&nbsp;&nbsp;' . htmlspecialchars(BackendUtility::getProcessedValue('pages', $field, $row[$field]));
                                        }
-                               } else {
-                                       $theData[$field] = '&nbsp;&nbsp;' . htmlspecialchars(BackendUtility::getProcessedValue('pages', $field, $row[$field]));
-                               }
-                               break;
                        }
                }
                $this->addElement_tdParams['title'] = $row['_CSSCLASS'] ? ' class="' . $row['_CSSCLASS'] . '"' : '';
@@ -1264,122 +1261,121 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                // Draw preview of the item depending on its CType (if not disabled by previous hook):
                if ($drawItem) {
                        switch ($row['CType']) {
-                       case 'header':
-                               if ($row['subheader']) {
-                                       $out .= $this->linkEditContent($this->renderText($row['subheader']), $row) . '<br />';
-                               }
-                               break;
-                       case 'text':
+                               case 'header':
+                                       if ($row['subheader']) {
+                                               $out .= $this->linkEditContent($this->renderText($row['subheader']), $row) . '<br />';
+                                       }
+                                       break;
+                               case 'text':
 
-                       case 'textpic':
+                               case 'textpic':
 
-                       case 'image':
-                               if ($row['CType'] == 'text' || $row['CType'] == 'textpic') {
-                                       if ($row['bodytext']) {
-                                               $this->getProcessedValue('tt_content', 'text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
-                                               $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                               case 'image':
+                                       if ($row['CType'] == 'text' || $row['CType'] == 'textpic') {
+                                               if ($row['bodytext']) {
+                                                       $this->getProcessedValue('tt_content', 'text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
+                                                       $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                                               }
                                        }
-                               }
-                               if ($row['CType'] == 'textpic' || $row['CType'] == 'image') {
-                                       if ($row['image']) {
-                                               $out .= $this->thumbCode($row, 'tt_content', 'image') . '<br />';
-                                               if ($row['imagecaption']) {
-                                                       $out .= $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
+                                       if ($row['CType'] == 'textpic' || $row['CType'] == 'image') {
+                                               if ($row['image']) {
+                                                       $out .= $this->thumbCode($row, 'tt_content', 'image') . '<br />';
+                                                       if ($row['imagecaption']) {
+                                                               $out .= $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
+                                                       }
                                                }
                                        }
-                               }
-                               break;
-                       case 'bullets':
+                                       break;
+                               case 'bullets':
 
-                       case 'table':
+                               case 'table':
 
-                       case 'mailform':
-                               if ($row['bodytext']) {
-                                       $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
-                               }
-                               break;
-                       case 'uploads':
-                               if ($row['media']) {
-                                       $out .= $this->thumbCode($row, 'tt_content', 'media') . '<br />';
-                               }
-                               break;
-                       case 'multimedia':
-                               if ($row['multimedia']) {
-                                       $out .= $this->renderText($row['multimedia']) . '<br />';
-                                       $out .= $this->renderText($row['parameters']) . '<br />';
-                               }
-                               break;
-                       case 'menu':
-                               if ($row['pages']) {
-                                       $out .= $this->linkEditContent($row['pages'], $row) . '<br />';
-                               }
-                               break;
-                       case 'shortcut':
-                               if (!empty($row['records'])) {
-                                       $shortcutContent = array();
-                                       $recordList = explode(',', $row['records']);
-                                       foreach ($recordList as $recordIdentifier) {
-                                               $split = BackendUtility::splitTable_Uid($recordIdentifier);
-                                               $tableName = empty($split[0]) ? 'tt_content' : $split[0];
-                                               $shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
-                                               if (is_array($shortcutRecord)) {
-                                                       $icon = IconUtility::getSpriteIconForRecord($tableName, $shortcutRecord);
-                                                       $onClick = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, $tableName, $shortcutRecord['uid'], 1, '', '+copy,info,edit,view', TRUE);
-                                                       $shortcutContent[] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars(BackendUtility::getRecordTitle($tableName, $shortcutRecord));
+                               case 'mailform':
+                                       if ($row['bodytext']) {
+                                               $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                                       }
+                                       break;
+                               case 'uploads':
+                                       if ($row['media']) {
+                                               $out .= $this->thumbCode($row, 'tt_content', 'media') . '<br />';
+                                       }
+                                       break;
+                               case 'multimedia':
+                                       if ($row['multimedia']) {
+                                               $out .= $this->renderText($row['multimedia']) . '<br />';
+                                               $out .= $this->renderText($row['parameters']) . '<br />';
+                                       }
+                                       break;
+                               case 'menu':
+                                       if ($row['pages']) {
+                                               $out .= $this->linkEditContent($row['pages'], $row) . '<br />';
+                                       }
+                                       break;
+                               case 'shortcut':
+                                       if (!empty($row['records'])) {
+                                               $shortcutContent = array();
+                                               $recordList = explode(',', $row['records']);
+                                               foreach ($recordList as $recordIdentifier) {
+                                                       $split = BackendUtility::splitTable_Uid($recordIdentifier);
+                                                       $tableName = empty($split[0]) ? 'tt_content' : $split[0];
+                                                       $shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
+                                                       if (is_array($shortcutRecord)) {
+                                                               $icon = IconUtility::getSpriteIconForRecord($tableName, $shortcutRecord);
+                                                               $onClick = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, $tableName, $shortcutRecord['uid'], 1, '', '+copy,info,edit,view', TRUE);
+                                                               $shortcutContent[] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars(BackendUtility::getRecordTitle($tableName, $shortcutRecord));
+                                                       }
                                                }
+                                               $out .= implode('<br />', $shortcutContent) . '<br />';
                                        }
-                                       $out .= implode('<br />', $shortcutContent) . '<br />';
-                               }
-                               break;
-                       case 'list':
-                               $hookArr = array();
-                               $hookOut = '';
-                               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
-                                       $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']];
-                               } elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'])) {
-                                       $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'];
-                               }
-                               if (count($hookArr) > 0) {
-                                       $_params = array('pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr);
-                                       foreach ($hookArr as $_funcRef) {
-                                               $hookOut .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                       break;
+                               case 'list':
+                                       $hookArr = array();
+                                       $hookOut = '';
+                                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
+                                               $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']];
+                                       } elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'])) {
+                                               $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'];
                                        }
-                               }
-                               if (strcmp($hookOut, '')) {
-                                       $out .= $hookOut;
-                               } elseif (!empty($row['list_type'])) {
-                                       $label = BackendUtility::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']);
-                                       if (!empty($label)) {
-                                               $out .=  '<strong>' . $GLOBALS['LANG']->sL($label, TRUE) . '</strong><br />';
+                                       if (count($hookArr) > 0) {
+                                               $_params = array('pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr);
+                                               foreach ($hookArr as $_funcRef) {
+                                                       $hookOut .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                               }
+                                       }
+                                       if (strcmp($hookOut, '')) {
+                                               $out .= $hookOut;
+                                       } elseif (!empty($row['list_type'])) {
+                                               $label = BackendUtility::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']);
+                                               if (!empty($label)) {
+                                                       $out .=  '<strong>' . $GLOBALS['LANG']->sL($label, TRUE) . '</strong><br />';
+                                               } else {
+                                                       $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue'), $row['list_type']);
+                                                       $out .= GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($message), '', FlashMessage::WARNING)->render();
+                                               }
+                                       } elseif (!empty($row['select_key'])) {
+                                               $out .= $GLOBALS['LANG']->sL(BackendUtility::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
                                        } else {
-                                               $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue'), $row['list_type']);
-                                               $out .= GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($message), '', FlashMessage::WARNING)->render();
+                                               $out .= '<strong>' . $GLOBALS['LANG']->getLL('noPluginSelected') . '</strong>';
                                        }
-                               } elseif (!empty($row['select_key'])) {
+                                       $out .= $GLOBALS['LANG']->sL(BackendUtility::getLabelFromItemlist('tt_content', 'pages', $row['pages']), 1) . '<br />';
+                                       break;
+                               case 'script':
                                        $out .= $GLOBALS['LANG']->sL(BackendUtility::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
-                               } else {
-                                       $out .= '<strong>' . $GLOBALS['LANG']->getLL('noPluginSelected') . '</strong>';
-                               }
-                               $out .= $GLOBALS['LANG']->sL(BackendUtility::getLabelFromItemlist('tt_content', 'pages', $row['pages']), 1) . '<br />';
-                               break;
-                       case 'script':
-                               $out .= $GLOBALS['LANG']->sL(BackendUtility::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
-                               $out .= '<br />' . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
-                               $out .= '<br />' . $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
-                               break;
-                       default:
-                               $contentType = $this->CType_labels[$row['CType']];
-
-                               if (isset($contentType)) {
-                                       $out .= '<strong>' . htmlspecialchars($contentType) . '</strong><br />';
-                                       if ($row['bodytext']) {
-                                               $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                                       $out .= '<br />' . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                                       $out .= '<br />' . $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
+                                       break;
+                               default:
+                                       $contentType = $this->CType_labels[$row['CType']];
+
+                                       if (isset($contentType)) {
+                                               $out .= '<strong>' . htmlspecialchars($contentType) . '</strong><br />';
+                                               if ($row['bodytext']) {
+                                                       $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
+                                               }
+                                       } else {
+                                               $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue'), $row['CType']);
+                                               $out .= GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($message), '', FlashMessage::WARNING)->render();
                                        }
-                               } else {
-                                       $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue'), $row['CType']);
-                                       $out .= GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($message), '', FlashMessage::WARNING)->render();
-                               }
-                               break;
                        }
                }
                // Wrap span-tags:
index 69ce83a..169d5ac 100644 (file)
@@ -1342,30 +1342,29 @@ abstract class AbstractUserAuthentication {
                $OK = FALSE;
                $passwordCompareStrategy = $passwordCompareStrategy ? $passwordCompareStrategy : $this->security_level;
                switch ($passwordCompareStrategy) {
-               case 'superchallenged':
-
-               case 'challenged':
-                       // Check challenge stored in cookie:
-                       if ($this->challengeStoredInCookie) {
-                               session_start();
-                               if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) {
-                                       if ($this->writeDevLog) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('PHP Session stored challenge "' . $_SESSION['login_challenge'] . '" and submitted challenge "' . $loginData['chalvalue'] . '" did not match, so authentication failed!', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
+                       case 'superchallenged':
+
+                       case 'challenged':
+                               // Check challenge stored in cookie:
+                               if ($this->challengeStoredInCookie) {
+                                       session_start();
+                                       if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) {
+                                               if ($this->writeDevLog) {
+                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('PHP Session stored challenge "' . $_SESSION['login_challenge'] . '" and submitted challenge "' . $loginData['chalvalue'] . '" did not match, so authentication failed!', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
+                                               }
+                                               $this->logoff();
+                                               return FALSE;
                                        }
-                                       $this->logoff();
-                                       return FALSE;
                                }
-                       }
-                       if ((string) $loginData[('uident_' . $passwordCompareStrategy)] === (string) md5(($user[$this->username_column] . ':' . $user[$this->userident_column] . ':' . $loginData['chalvalue']))) {
-                               $OK = TRUE;
-                       }
-                       break;
-               default:
-                       // normal
-                       if ((string) $loginData['uident_text'] === (string) $user[$this->userident_column]) {
-                               $OK = TRUE;
-                       }
-                       break;
+                               if ((string) $loginData[('uident_' . $passwordCompareStrategy)] === (string) md5(($user[$this->username_column] . ':' . $user[$this->userident_column] . ':' . $loginData['chalvalue']))) {
+                                       $OK = TRUE;
+                               }
+                               break;
+                       default:
+                               // normal
+                               if ((string) $loginData['uident_text'] === (string) $user[$this->userident_column]) {
+                                       $OK = TRUE;
+                               }
                }
                return $OK;
        }
index 5bc34e0..2ff0d48 100644 (file)
@@ -640,40 +640,40 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                $out = TRUE;
                // Checking value:
                switch ((string) $authMode) {
-               case 'explicitAllow':
-                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
-                               $out = FALSE;
-                       }
-                       break;
-               case 'explicitDeny':
-                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
-                               $out = FALSE;
-                       }
-                       break;
-               case 'individual':
-                       if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
-                               $items = $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'];
-                               if (is_array($items)) {
-                                       foreach ($items as $iCfg) {
-                                               if (!strcmp($iCfg[1], $value) && $iCfg[4]) {
-                                                       switch ((string) $iCfg[4]) {
-                                                       case 'EXPL_ALLOW':
-                                                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
-                                                                       $out = FALSE;
-                                                               }
-                                                               break;
-                                                       case 'EXPL_DENY':
-                                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
-                                                                       $out = FALSE;
+                       case 'explicitAllow':
+                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
+                                       $out = FALSE;
+                               }
+                               break;
+                       case 'explicitDeny':
+                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
+                                       $out = FALSE;
+                               }
+                               break;
+                       case 'individual':
+                               if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
+                                       $items = $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'];
+                                       if (is_array($items)) {
+                                               foreach ($items as $iCfg) {
+                                                       if (!strcmp($iCfg[1], $value) && $iCfg[4]) {
+                                                               switch ((string) $iCfg[4]) {
+                                                                       case 'EXPL_ALLOW':
+                                                                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
+                                                                                       $out = FALSE;
+                                                                               }
+                                                                               break;
+                                                                       case 'EXPL_DENY':
+                                                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
+                                                                                       $out = FALSE;
+                                                                               }
+