Commit 1a3ba299 authored by Roland Waldner's avatar Roland Waldner Committed by Christian Kuhn
Browse files

[TASK] CGL violations "AssignmentArithmeticAndComparisonSpace"

Change-Id: I9970ef5e2087233db095a1d296261c6eb06def18
Resolves: #41498
Releases: 6.0
Reviewed-on: http://review.typo3.org/15198
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 60714a00
......@@ -675,7 +675,7 @@ class BackendController {
* @return void
*/
protected function executeHook($identifier, array $hookConfiguration = array()) {
$options =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php'];
$options = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php'];
if (isset($options[$identifier]) && is_array($options[$identifier])) {
foreach ($options[$identifier] as $hookFunction) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hookFunction, $hookConfiguration, $this);
......
......@@ -446,7 +446,7 @@ class NewContentElementController {
foreach ($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
if (is_array($GLOBALS['TCA']['tt_content']['columns'][$fN])) {
// Get information about if the field value is OK:
$config =& $GLOBALS['TCA']['tt_content']['columns'][$fN]['config'];
$config = &$GLOBALS['TCA']['tt_content']['columns'][$fN]['config'];
$authModeDeny = $config['type'] == 'select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']);
$isNotInKeepItems = count($keepItems) && !in_array($fV, $keepItems);
if ($authModeDeny || $fN == 'CType' && in_array($fV, $removeItems) || $isNotInKeepItems) {
......
......@@ -104,7 +104,7 @@ class EditFileController {
$this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
// Hook before compiling the output
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'])) {
$preOutputProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'];
$preOutputProcessingHook = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'];
if (is_array($preOutputProcessingHook)) {
$hookParameters = array(
'content' => &$this->content,
......@@ -147,7 +147,7 @@ class EditFileController {
$pageContent .= $code;
// Hook after compiling the output
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['postOutputProcessingHook'])) {
$postOutputProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['postOutputProcessingHook'];
$postOutputProcessingHook = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['postOutputProcessingHook'];
if (is_array($postOutputProcessingHook)) {
$hookParameters = array(
'pageContent' => &$pageContent,
......
......@@ -872,7 +872,7 @@ class DataPreprocessor {
*/
public function procItems($items, $itemsProcFuncTSconfig, $config, $table, $row, $field) {
$params = array();
$params['items'] =& $items;
$params['items'] = &$items;
$params['config'] = $config;
$params['TSconfig'] = $itemsProcFuncTSconfig;
$params['table'] = $table;
......
......@@ -127,9 +127,9 @@ class InlineElement {
*/
public function init(&$tceForms) {
$this->fObj = $tceForms;
$this->backPath =& $tceForms->backPath;
$this->prependFormFieldNames =& $this->fObj->prependFormFieldNames;
$this->prependCmdFieldNames =& $this->fObj->prependCmdFieldNames;
$this->backPath = &$tceForms->backPath;
$this->prependFormFieldNames = &$this->fObj->prependFormFieldNames;
$this->prependCmdFieldNames = &$this->fObj->prependCmdFieldNames;
$this->inlineStyles['margin-right'] = '5';
$this->initHookObjects();
}
......@@ -143,7 +143,7 @@ class InlineElement {
protected function initHookObjects() {
$this->hookObjects = array();
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook'])) {
$tceformsInlineHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook'];
$tceformsInlineHook = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook'];
if (is_array($tceformsInlineHook)) {
foreach ($tceformsInlineHook as $classData) {
$processObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);
......@@ -571,8 +571,8 @@ class InlineElement {
// Initialize:
$cells = array();
$isNewItem = substr($rec['uid'], 0, 3) == 'NEW';
$tcaTableCtrl =& $GLOBALS['TCA'][$foreign_table]['ctrl'];
$tcaTableCols =& $GLOBALS['TCA'][$foreign_table]['columns'];
$tcaTableCtrl = &$GLOBALS['TCA'][$foreign_table]['ctrl'];
$tcaTableCols = &$GLOBALS['TCA'][$foreign_table]['columns'];
$isPagesTable = $foreign_table == 'pages' ? TRUE : FALSE;
$isOnSymmetricSide = \TYPO3\CMS\Core\Database\RelationHandler::isOnSymmetricSide($parentUid, $config, $rec);
$enableManualSorting = $tcaTableCtrl['sortby'] || $config['MM'] || !$isOnSymmetricSide && $config['foreign_sortby'] || $isOnSymmetricSide && $config['symmetric_sortby'] ? TRUE : FALSE;
......@@ -1194,7 +1194,7 @@ class InlineElement {
$parent = $this->getStructureLevel(-1);
$current = $this->inlineStructure['unstable'];
$jsonArray = array('scriptCall' => array());
$jsonArrayScriptCall =& $jsonArray['scriptCall'];
$jsonArrayScriptCall = &$jsonArray['scriptCall'];
$nameObject = $this->inlineNames['object'];
$nameObjectForeignTable = $nameObject . self::Structure_Separator . $current['table'];
// Get the name of the field pointing to the original record:
......@@ -1248,7 +1248,7 @@ class InlineElement {
// Only do some action if the top record and the current record were saved before
if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($top['uid'])) {
$inlineView = (array) unserialize($GLOBALS['BE_USER']->uc['inlineView']);
$inlineViewCurrent =& $inlineView[$top['table']][$top['uid']];
$inlineViewCurrent = &$inlineView[$top['table']][$top['uid']];
$expandUids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $expand);
$collapseUids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $collapse);
// Set records to be expanded
......@@ -2221,7 +2221,7 @@ class InlineElement {
}
// Add new expanded child records to UC (if any):
if (count($newExpandedChildren)) {
$inlineViewCurrent =& $inlineView[$topTable][$topUid][$childTable];
$inlineViewCurrent = &$inlineView[$topTable][$topUid][$childTable];
if (is_array($inlineViewCurrent)) {
$inlineViewCurrent = array_unique(array_merge($inlineViewCurrent, $newExpandedChildren));
} else {
......
......@@ -151,7 +151,7 @@ class SuggestDefaultReceiver {
*/
public function queryTable(&$params, $recursionCounter = 0) {
$rows = array();
$this->params =& $params;
$this->params = &$params;
$start = $recursionCounter * 50;
$this->prepareSelectStatement();
$this->prepareOrderByStatement();
......
......@@ -49,7 +49,7 @@ class SuggestElement {
* @return void
*/
public function init(&$tceForms) {
$this->TCEformsObj =& $tceForms;
$this->TCEformsObj = &$tceForms;
}
/**
......
......@@ -698,7 +698,7 @@ class FormEngine {
// Load the full TCA for the table.
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
// Get dividers2tabs setting from TCA of the current table:
$dividers2tabs =& $GLOBALS['TCA'][$table]['ctrl']['dividers2tabs'];
$dividers2tabs = &$GLOBALS['TCA'][$table]['ctrl']['dividers2tabs'];
// Load the description content for the table.
if ($this->edit_showFieldHelp || $this->doLoadTableDescr($table)) {
$GLOBALS['LANG']->loadSingleTableDescription($table);
......@@ -2948,7 +2948,7 @@ function ' . $evalData . '(value) {
$PA['field'] = $field;
$PA['row'] = $row;
$PA['parameters'] = isset($PA['fieldConf']['config']['parameters']) ? $PA['fieldConf']['config']['parameters'] : array();
$PA['pObj'] =& $this;
$PA['pObj'] = &$this;
return \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($PA['fieldConf']['config']['userFunc'], $PA, $this);
}
......@@ -3810,7 +3810,7 @@ function ' . $evalData . '(value) {
}
// Traverse wizards:
if (is_array($wizConf) && !$this->disableWizards) {
$parametersOfWizards =& $specConf['wizards']['parameters'];
$parametersOfWizards = &$specConf['wizards']['parameters'];
foreach ($wizConf as $wid => $wConf) {
if (substr($wid, 0, 1) != '_' && (!$wConf['enableByTypeConfig'] || is_array($parametersOfWizards) && in_array($wid, $parametersOfWizards)) && ($RTE || !$wConf['RTEonly'])) {
// Title / icon:
......@@ -3885,7 +3885,7 @@ function ' . $evalData . '(value) {
break;
case 'userFunc':
// Reference set!
$params['item'] =& $item;
$params['item'] = &$item;
$params['icon'] = $icon;
$params['iTitle'] = $iTitle;
$params['wConf'] = $wConf;
......@@ -3894,7 +3894,7 @@ function ' . $evalData . '(value) {
break;
case 'slider':
// Reference set!
$params['item'] =& $item;
$params['item'] = &$item;
$params['icon'] = $icon;
$params['iTitle'] = $iTitle;
$params['wConf'] = $wConf;
......@@ -4429,7 +4429,7 @@ function ' . $evalData . '(value) {
*/
public function procItems($items, $iArray, $config, $table, $row, $field) {
$params = array();
$params['items'] =& $items;
$params['items'] = &$items;
$params['config'] = $config;
$params['TSconfig'] = $iArray;
$params['table'] = $table;
......
......@@ -319,7 +319,7 @@ class LiveSearch {
if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->queryString)) {
foreach ($fieldsToSearchWithin as $fieldName) {
if ($fieldName == 'uid' || $fieldName == 'pid' || isset($GLOBALS['TCA'][$tableName]['columns'][$fieldName])) {
$fieldConfig =& $GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'];
$fieldConfig = &$GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'];
// Assemble the search condition only if the field is an integer, or is uid or pid
if ($fieldName == 'uid' || $fieldName == 'pid' || $fieldConfig['type'] == 'input' && $fieldConfig['eval'] && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($fieldConfig['eval'], 'int')) {
$whereParts[] = $fieldName . '=' . $this->queryString;
......@@ -330,7 +330,7 @@ class LiveSearch {
$like = '\'%' . $GLOBALS['TYPO3_DB']->escapeStrForLike($GLOBALS['TYPO3_DB']->quoteStr($this->queryString, $tableName), $tableName) . '%\'';
foreach ($fieldsToSearchWithin as $fieldName) {
if (isset($GLOBALS['TCA'][$tableName]['columns'][$fieldName])) {
$fieldConfig =& $GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'];
$fieldConfig = &$GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'];
// Check whether search should be case-sensitive or not
$format = 'LCASE(%s) LIKE LCASE(%s)';
if (is_array($fieldConfig['search'])) {
......@@ -472,4 +472,4 @@ class LiveSearch {
}
?>
?>
\ No newline at end of file
......@@ -716,7 +716,7 @@ class DocumentTemplate {
public function startPage($title, $includeCsh = TRUE) {
// hook pre start page
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'])) {
$preStartPageHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'];
$preStartPageHook = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'];
if (is_array($preStartPageHook)) {
$hookParameters = array(
'title' => &$title
......@@ -846,7 +846,7 @@ class DocumentTemplate {
}
// hook for additional headerData
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'])) {
$preHeaderRenderHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'];
$preHeaderRenderHook = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'];
if (is_array($preHeaderRenderHook)) {
$hookParameters = array(
'pageRenderer' => &$this->pageRenderer
......
......@@ -997,16 +997,16 @@ abstract class AbstractTreeView {
*/
public function setDataFromArray(&$dataArr, $traverse = FALSE, $pid = 0) {
if (!$traverse) {
$this->data =& $dataArr;
$this->data = &$dataArr;
$this->dataLookup = array();
// Add root
$this->dataLookup[0][$this->subLevelID] =& $dataArr;
$this->dataLookup[0][$this->subLevelID] = &$dataArr;
}
foreach ($dataArr as $uid => $val) {
$dataArr[$uid]['uid'] = $uid;
$dataArr[$uid]['pid'] = $pid;
// Gives quick access to id's
$this->dataLookup[$uid] =& $dataArr[$uid];
$this->dataLookup[$uid] = &$dataArr[$uid];
if (is_array($val[$this->subLevelID])) {
$this->setDataFromArray($dataArr[$uid][$this->subLevelID], TRUE, $uid);
}
......@@ -1022,8 +1022,8 @@ abstract class AbstractTreeView {
* @todo Define visibility
*/
public function setDataFromTreeArray(&$treeArr, &$treeLookupArr) {
$this->data =& $treeArr;
$this->dataLookup =& $treeLookupArr;
$this->data = &$treeArr;
$this->dataLookup = &$treeLookupArr;
}
}
......
......@@ -146,9 +146,9 @@ class BackendUserSettingsDataProvider {
*/
protected function getFromDottedNotation($key) {
$subkeys = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $key);
$array =& $GLOBALS['BE_USER']->uc;
$array = &$GLOBALS['BE_USER']->uc;
foreach ($subkeys as $subkey) {
$array =& $array[$subkey];
$array = &$array[$subkey];
}
return $array;
}
......@@ -163,12 +163,12 @@ class BackendUserSettingsDataProvider {
protected function setFromDottedNotation($key, $value) {
$subkeys = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $key, TRUE);
$lastKey = $subkeys[count($subkeys) - 1];
$array =& $GLOBALS['BE_USER']->uc;
$array = &$GLOBALS['BE_USER']->uc;
foreach ($subkeys as $subkey) {
if ($subkey === $lastKey) {
$array[$subkey] = $value;
} else {
$array =& $array[$subkey];
$array = &$array[$subkey];
}
}
}
......
......@@ -1195,7 +1195,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$infoArr = array();
$drawItem = TRUE;
// Hook: Render an own preview of a record
$drawItemHooks =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'];
$drawItemHooks = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'];
if (is_array($drawItemHooks)) {
foreach ($drawItemHooks as $hookClass) {
$hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($hookClass);
......
......@@ -1245,7 +1245,7 @@ class CharsetConverter {
// key = utf8 char (single codepoint), value = utf8 string (codepoint sequence)
// Note: we use the UTF-8 characters here and not the Unicode numbers to avoid conversion roundtrip in utf8_strtolower/-upper)
$this->caseFolding['utf-8'] = array();
$utf8CaseFolding =& $this->caseFolding['utf-8'];
$utf8CaseFolding = &$this->caseFolding['utf-8'];
// a shorthand
$utf8CaseFolding['toUpper'] = array();
$utf8CaseFolding['toLower'] = array();
......@@ -1409,7 +1409,7 @@ class CharsetConverter {
}
// Create ascii only mapping
$this->toASCII['utf-8'] = array();
$ascii =& $this->toASCII['utf-8'];
$ascii = &$this->toASCII['utf-8'];
foreach ($decomposition as $from => $to) {
$code_decomp = array();
while ($code_value = array_shift($to)) {
......@@ -1880,14 +1880,14 @@ class CharsetConverter {
return $str;
}
// Do nothing
$map =& $this->caseFolding[$charset][$opt];
$map = &$this->caseFolding[$charset][$opt];
break;
case 'ascii':
if (!$this->initToASCII($charset)) {
return $str;
}
// Do nothing
$map =& $this->toASCII[$charset];
$map = &$this->toASCII[$charset];
break;
default:
return $str;
......@@ -2148,10 +2148,10 @@ class CharsetConverter {
$out = '';
switch ($mode) {
case 'case':
$map =& $this->caseFolding['utf-8'][$opt];
$map = &$this->caseFolding['utf-8'][$opt];
break;
case 'ascii':
$map =& $this->toASCII['utf-8'];
$map = &$this->toASCII['utf-8'];
break;
default:
return $str;
......@@ -2347,14 +2347,14 @@ class CharsetConverter {
return $str;
}
// do nothing
$map =& $this->caseFolding[$charset][$opt];
$map = &$this->caseFolding[$charset][$opt];
break;
case 'ascii':
if (!$this->initToASCII($charset)) {
return $str;
}
// do nothing
$map =& $this->toASCII[$charset];
$map = &$this->toASCII[$charset];
break;
default:
return $str;
......
......@@ -173,8 +173,8 @@ class FlexFormTools {
$PA['table'] = $table;
$PA['field'] = $field;
$PA['uid'] = $row['uid'];
$this->traverseFlexFormXMLData_DS =& $dataStruct;
$this->traverseFlexFormXMLData_Data =& $editData;
$this->traverseFlexFormXMLData_DS = &$dataStruct;
$this->traverseFlexFormXMLData_Data = &$editData;
// Render flexform:
$this->traverseFlexFormXMLData_recurse($dataStruct['ROOT']['el'], $editData['data'][$sheet][$lang], $PA, 'data/' . $sheet . '/' . $lang);
} else {
......
......@@ -439,10 +439,10 @@ class QueryGenerator {
if ($POST['qG_del']) {
// Initialize array to work on, save special parameters
$ssArr = $this->getSubscript($POST['qG_del']);
$workArr =& $this->queryConfig;
$workArr = &$this->queryConfig;
$ssArrSize = sizeof($ssArr) - 1;
for ($i = 0; $i < $ssArrSize; $i++) {
$workArr =& $workArr[$ssArr[$i]];
$workArr = &$workArr[$ssArr[$i]];
}
// Delete the entry and move the other entries
unset($workArr[$ssArr[$i]]);
......@@ -456,10 +456,10 @@ class QueryGenerator {
if ($POST['qG_ins']) {
// Initialize array to work on, save special parameters
$ssArr = $this->getSubscript($POST['qG_ins']);
$workArr =& $this->queryConfig;
$workArr = &$this->queryConfig;
$ssArrSize = sizeof($ssArr) - 1;
for ($i = 0; $i < $ssArrSize; $i++) {
$workArr =& $workArr[$ssArr[$i]];
$workArr = &$workArr[$ssArr[$i]];
}
// Move all entries above position where new entry is to be inserted
$workArrSize = sizeof($workArr);
......@@ -474,10 +474,10 @@ class QueryGenerator {
if ($POST['qG_up']) {
// Initialize array to work on
$ssArr = $this->getSubscript($POST['qG_up']);
$workArr =& $this->queryConfig;
$workArr = &$this->queryConfig;
$ssArrSize = sizeof($ssArr) - 1;
for ($i = 0; $i < $ssArrSize; $i++) {
$workArr =& $workArr[$ssArr[$i]];
$workArr = &$workArr[$ssArr[$i]];
}
// Swap entries
$qG_tmp = $workArr[$ssArr[$i]];
......@@ -488,10 +488,10 @@ class QueryGenerator {
if ($POST['qG_nl']) {
// Initialize array to work on
$ssArr = $this->getSubscript($POST['qG_nl']);
$workArr =& $this->queryConfig;
$workArr = &$this->queryConfig;
$ssArraySize = sizeof($ssArr) - 1;
for ($i = 0; $i < $ssArraySize; $i++) {
$workArr =& $workArr[$ssArr[$i]];
$workArr = &$workArr[$ssArr[$i]];
}
// Do stuff:
$tempEl = $workArr[$ssArr[$i]];
......@@ -509,10 +509,10 @@ class QueryGenerator {
if ($POST['qG_remnl']) {
// Initialize array to work on
$ssArr = $this->getSubscript($POST['qG_remnl']);
$workArr =& $this->queryConfig;
$workArr = &$this->queryConfig;
$ssArrSize = sizeof($ssArr) - 1;
for ($i = 0; $i < $ssArrSize; $i++) {
$workArr =& $workArr[$ssArr[$i]];
$workArr = &$workArr[$ssArr[$i]];
}
// Do stuff:
$tempEl = $workArr[$ssArr[$i]];
......
......@@ -139,7 +139,7 @@ class SqlParser {
$result = array();
if ($parameterReferences === NULL) {
$result['parameters'] = array();
$parameterReferences =& $result['parameters'];
$parameterReferences = &$result['parameters'];
}
$result['type'] = 'SELECT';
// Looking for STRAIGHT_JOIN keyword:
......@@ -1170,7 +1170,7 @@ class SqlParser {
$stack[$level][$pnt[$level]]['values'][1] = $this->getValue($parseString);
} else {
// Finding value for comparator:
$stack[$level][$pnt[$level]]['value'] =& $this->getValueOrParameter($parseString, $stack[$level][$pnt[$level]]['comparator'], '', $parameterReferences);
$stack[$level][$pnt[$level]]['value'] = &$this->getValueOrParameter($parseString, $stack[$level][$pnt[$level]]['comparator'], '', $parameterReferences);
if ($this->parse_error) {
return $this->parse_error;
}
......@@ -1317,15 +1317,15 @@ class SqlParser {
$parameterReferences['?'] = array();
}
$value = array('?');
$parameterReferences['?'][] =& $value;
$parameterReferences['?'][] = &$value;
} elseif ($parameter !== '') {
// named parameter
if (isset($parameterReferences[$parameter])) {
// Use the same reference as last time we encountered this parameter
$value =& $parameterReferences[$parameter];
$value = &$parameterReferences[$parameter];
} else {
$value = array($parameter);
$parameterReferences[$parameter] =& $value;
$parameterReferences[$parameter] = &$value;
}
} else {
$value = $this->getValue($parseString, $comparator, $mode);
......
......@@ -315,7 +315,7 @@ class ExtensionManager {
$processedPalettes = array();
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
if (isset($GLOBALS['TCA'][$table]['columns'][$field])) {
$types =& $GLOBALS['TCA'][$table]['types'];
$types = &$GLOBALS['TCA'][$table]['types'];
if (is_array($types)) {
// Iterate through all types and search for the field that defines the palette to be extended:
foreach (array_keys($types) as $type) {
......@@ -357,7 +357,7 @@ class ExtensionManager {
static public function addFieldsToPalette($table, $palette, $addFields, $insertionPosition = '') {
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
if (isset($GLOBALS['TCA'][$table])) {
$paletteData =& $GLOBALS['TCA'][$table]['palettes'][$palette];
$paletteData = &$GLOBALS['TCA'][$table]['palettes'][$palette];
// If palette already exists, merge the data:
if (is_array($paletteData)) {
$paletteData['showitem'] = self::executePositionedStringInsertion($paletteData['showitem'], $addFields, $insertionPosition);
......
......@@ -1706,9 +1706,9 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface {
if ($namespace) {
if (strpos($namespace, '.')) {
$parts = explode('.', $namespace);
$a =& $this->inlineSettings;
$a = &$this->inlineSettings;
foreach ($parts as $part) {
$a =& $a[$part];
$a = &$a[$part];
}
$a[$key] = $value;
} else {
......@@ -1733,9 +1733,9 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface {
if ($namespace) {
if (strpos($namespace, '.')) {
$parts = explode('.', $namespace);
$a =& $this->inlineSettings;
$a = &$this->inlineSettings;
foreach ($parts as $part) {
$a =& $a[$part];
$a = &$a[$part];
}
$a = array_merge((array) $a, $array);
} else {
......
......@@ -102,10 +102,10 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface {
foreach ($this->driverConfigurations as $driver) {
$label = $driver['label'] ?: $driver['class'];
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('sys_file_storage');
$driverFieldConfig =& $GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
$driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
$driverFieldConfig['items'][] = array($label, $driver['shortName']);
if ($driver['flexFormDS']) {
$configurationFieldConfig =& $GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
$configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
$configurationFieldConfig['ds'][$driver['shortName']] = $driver['flexFormDS'];
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment