Commit 4433a85e authored by Arvid Jakobsson's avatar Arvid Jakobsson Committed by Helmut Hummel
Browse files

[TASK] Remove superfluous parenthesis in sysext backend

Change ("a" . "b") . "c" into "a" . "b" . "c" using the lex-pass tool.

Change-Id: I8a30e8689c1c567770d0c03beaa12a0bf29e9b09
Resolves: #40878
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14563
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
parent d9d695c5
......@@ -65,7 +65,7 @@ class AjaxLoginHandler {
* @return boolean
*/
protected function isAuthorizedBackendSession() {
return (isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication) && isset($GLOBALS['BE_USER']->user['uid']);
return isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication && isset($GLOBALS['BE_USER']->user['uid']);
}
/**
......@@ -75,7 +75,7 @@ class AjaxLoginHandler {
*/
protected function hasLoginBeenProcessed() {
$loginFormData = $GLOBALS['BE_USER']->getLoginFormData();
return ((($loginFormData['status'] == 'login' && isset($loginFormData['uname'])) && isset($loginFormData['uident'])) && isset($loginFormData['chalvalue'])) && (string) $_COOKIE[\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCookieName()] !== (string) $GLOBALS['BE_USER']->id;
return $loginFormData['status'] == 'login' && isset($loginFormData['uname']) && isset($loginFormData['uident']) && isset($loginFormData['chalvalue']) && (string) $_COOKIE[\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCookieName()] !== (string) $GLOBALS['BE_USER']->id;
}
/**
......@@ -130,7 +130,7 @@ class AjaxLoginHandler {
$timeout = $GLOBALS['BE_USER']->auth_timeout_field;
// If 120 seconds from now is later than the session timeout, we need to show the refresh dialog.
// 120 is somewhat arbitrary to allow for a little room during the countdown and load times, etc.
if ($GLOBALS['EXEC_TIME'] >= ($ses_tstamp + $timeout) - 120) {
if ($GLOBALS['EXEC_TIME'] >= $ses_tstamp + $timeout - 120) {
$ajaxObj->addContent('login', array('will_time_out' => TRUE));
} else {
$ajaxObj->addContent('login', array('will_time_out' => FALSE));
......
......@@ -62,7 +62,7 @@ class TranslationConfigurationProvider {
}
$languageIconTitles[0] = array(
'uid' => 0,
'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? (($modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (') . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage')) . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'),
'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage') . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'),
'ISOcode' => 'DEF',
'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? 'flags-' . $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty'
);
......@@ -114,7 +114,7 @@ class TranslationConfigurationProvider {
if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] <= 0) {
if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] == 0) {
// Look for translations of this record, index by language field value:
$translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, (((((((($GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=') . intval($uid)) . ' AND pid=') . intval(($table === 'pages' ? $row['uid'] : $row['pid']))) . ' AND ') . $GLOBALS['TCA'][$trTable]['ctrl']['languageField']) . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid))) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($trTable)) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($trTable));
$translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) . ' AND pid=' . intval(($table === 'pages' ? $row['uid'] : $row['pid'])) . ' AND ' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($trTable) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($trTable));
$translations = array();
$translations_errors = array();
foreach ($translationsTemp as $r) {
......@@ -134,19 +134,19 @@ class TranslationConfigurationProvider {
'excessive_translations' => $translations_errors
);
} else {
return ((((('Record "' . $table) . '_') . $uid) . '" seems to be a translation already (has a relation to record "') . $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) . '")';
return 'Record "' . $table . '_' . $uid . '" seems to be a translation already (has a relation to record "' . $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] . '")';
}
} else {
return ((((((('Record "' . $table) . '_') . $uid) . '" seems to be a translation already (has a language value "') . $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) . '", relation to record "') . $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) . '")';
return 'Record "' . $table . '_' . $uid . '" seems to be a translation already (has a language value "' . $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] . '", relation to record "' . $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] . '")';
}
} else {
return 'Translation is not supported for this table!';
}
} else {
return ((('Record "' . $table) . '_') . $uid) . '" was not found';
return 'Record "' . $table . '_' . $uid . '" was not found';
}
} else {
return ('No table "' . $table) . '" or no UID value';
return 'No table "' . $table . '" or no UID value';
}
}
......@@ -169,7 +169,7 @@ class TranslationConfigurationProvider {
* @todo Define visibility
*/
public function isTranslationInOwnTable($table) {
return ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'];
return $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'];
}
/**
......@@ -181,7 +181,7 @@ class TranslationConfigurationProvider {
*/
public function foreignTranslationTable($table) {
$trTable = $GLOBALS['TCA'][$table]['ctrl']['transForeignTable'];
if (((($trTable && $GLOBALS['TCA'][$trTable]) && $GLOBALS['TCA'][$trTable]['ctrl']['languageField']) && $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField']) && $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerTable'] === $table) {
if ($trTable && $GLOBALS['TCA'][$trTable] && $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] && $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] && $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerTable'] === $table) {
return $trTable;
}
}
......
......@@ -55,7 +55,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
$this->type = $type;
$this->id = $id;
$this->rootLine = $rootLine;
$hash = md5(($type . ':') . $TStext);
$hash = md5($type . ':' . $TStext);
$cachedContent = \TYPO3\CMS\Backend\Utility\BackendUtility::getHash($hash, 0);
if ($cachedContent) {
$storedData = unserialize($cachedContent);
......
......@@ -93,7 +93,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
case 'PIDinRootline':
$values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
if (($key == 'PIDinRootline' || !in_array($this->pageId, $values)) || $this->isNewPageWithPageId($this->pageId)) {
if ($key == 'PIDinRootline' || !in_array($this->pageId, $values) || $this->isNewPageWithPageId($this->pageId)) {
foreach ($values as $test) {
foreach ($this->rootline as $rl_dat) {
if ($rl_dat['uid'] == $test) {
......@@ -212,7 +212,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
$elementsData = $GLOBALS['SOBE']->elementsData;
$data = $GLOBALS['SOBE']->data;
// If saving a new page record:
if ((is_array($data) && isset($data['pages'])) && is_array($data['pages'])) {
if (is_array($data) && isset($data['pages']) && is_array($data['pages'])) {
foreach ($data['pages'] as $uid => $fields) {
if (strpos($uid, 'NEW') === 0 && $fields['pid'] == $pageId) {
return TRUE;
......
......@@ -82,7 +82,7 @@ abstract class AbstractContextMenuDataProvider {
* @return array
*/
protected function getConfiguration() {
$contextMenuActions = $GLOBALS['BE_USER']->getTSConfig(('options.contextMenu.' . $this->contextMenuType) . '.items');
$contextMenuActions = $GLOBALS['BE_USER']->getTSConfig('options.contextMenu.' . $this->contextMenuType . '.items');
return $contextMenuActions['properties'];
}
......@@ -184,7 +184,7 @@ abstract class AbstractContextMenuDataProvider {
if ($type === 'DIVIDER') {
$action->setType('divider');
} else {
if (in_array($actionConfiguration['name'], $this->disableItems) || (isset($actionConfiguration['displayCondition']) && trim($actionConfiguration['displayCondition']) !== '') && !$this->evaluateDisplayCondition($node, $actionConfiguration['displayCondition'])) {
if (in_array($actionConfiguration['name'], $this->disableItems) || isset($actionConfiguration['displayCondition']) && trim($actionConfiguration['displayCondition']) !== '' && !$this->evaluateDisplayCondition($node, $actionConfiguration['displayCondition'])) {
unset($action);
continue;
}
......
......@@ -54,7 +54,7 @@ class ContextMenuDataProvider extends \TYPO3\CMS\Backend\ContextMenu\AbstractCon
* @return array
*/
protected function getDisableActions() {
$tsConfig = $GLOBALS['BE_USER']->getTSConfig(('options.contextMenu.' . $this->getContextMenuType()) . '.disableItems');
$tsConfig = $GLOBALS['BE_USER']->getTSConfig('options.contextMenu.' . $this->getContextMenuType() . '.disableItems');
$disableItems = array();
if (trim($tsConfig['value']) !== '') {
$disableItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tsConfig['value']);
......
......@@ -126,7 +126,7 @@ class BackendController {
foreach ($coreToolbarItems as $toolbarItemName => $toolbarItemClassName) {
$toolbarItem = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($toolbarItemClassName, $this);
if (!$toolbarItem instanceof \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface) {
throw new \UnexpectedValueException(('$toolbarItem "' . $toolbarItemName) . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195126772);
throw new \UnexpectedValueException('$toolbarItem "' . $toolbarItemName . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195126772);
}
if ($toolbarItem->checkAccess()) {
$this->toolbarItems[$toolbarItemName] = $toolbarItem;
......@@ -147,10 +147,10 @@ class BackendController {
$logo = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Views\\LogoView');
$logo->setLogo('gfx/typo3logo_mini.png');
// Create backend scaffolding
$backendScaffolding = ((('
$backendScaffolding = '
<div id="typo3-top-container" class="x-hide-display">
<div id="typo3-logo">' . $logo->render()) . '</div>
<div id="typo3-top" class="typo3-top-toolbar">') . $this->renderToolbar()) . '</div>
<div id="typo3-logo">' . $logo->render() . '</div>
<div id="typo3-top" class="typo3-top-toolbar">' . $this->renderToolbar() . '</div>
</div>';
/******************************************************
* Now put the complete backend document together
......@@ -182,7 +182,7 @@ class BackendController {
}));
';
if ($states) {
$extOnReadyCode .= ('Ext.state.Manager.getProvider().initState(' . json_encode($states)) . ');';
$extOnReadyCode .= 'Ext.state.Manager.getProvider().initState(' . json_encode($states) . ');';
}
$extOnReadyCode .= '
TYPO3.Backend = new TYPO3.Viewport(TYPO3.Viewport.configuration);
......@@ -192,7 +192,7 @@ class BackendController {
TYPO3.ContextHelpWindow.init();';
$this->pageRenderer->addExtOnReadyCode($extOnReadyCode);
// Set document title:
$title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ? (($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ' [TYPO3 ') . TYPO3_version) . ']' : 'TYPO3 ' . TYPO3_version;
$title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ' [TYPO3 ' . TYPO3_version . ']' : 'TYPO3 ' . TYPO3_version;
$this->content = $backendScaffolding;
// Renders the module page
$this->content = $GLOBALS['TBE_TEMPLATE']->render($title, $this->content);
......@@ -217,9 +217,9 @@ class BackendController {
}
$loadedComponents[] = $info['componentId'];
$component = strtolower(substr($info['componentId'], strrpos($info['componentId'], '-') + 1));
$componentDirectory = ('components/' . $component) . '/';
$componentDirectory = 'components/' . $component . '/';
if ($info['isCoreComponent']) {
$absoluteComponentPath = (PATH_t3lib . 'js/extjs/') . $componentDirectory;
$absoluteComponentPath = PATH_t3lib . 'js/extjs/' . $componentDirectory;
$relativeComponentPath = '../' . str_replace(PATH_site, '', $absoluteComponentPath);
} else {
$absoluteComponentPath = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($info['extKey']) . $componentDirectory;
......@@ -233,7 +233,7 @@ class BackendController {
$cssFiles = array_merge($cssFilesOrdered, $cssFiles);
}
foreach ($cssFiles as $cssFile) {
$this->pageRenderer->addCssFile(($relativeComponentPath . 'css/') . $cssFile);
$this->pageRenderer->addCssFile($relativeComponentPath . 'css/' . $cssFile);
}
$jsFiles = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($absoluteComponentPath . 'javascript/', 'js');
if (file_exists($absoluteComponentPath . 'javascript/loadorder.txt')) {
......@@ -243,7 +243,7 @@ class BackendController {
$jsFiles = array_merge($jsFilesOrdered, $jsFiles);
}
foreach ($jsFiles as $jsFile) {
$this->pageRenderer->addJsFile(($relativeComponentPath . 'javascript/') . $jsFile);
$this->pageRenderer->addJsFile($relativeComponentPath . 'javascript/' . $jsFile);
}
}
}
......@@ -261,8 +261,8 @@ class BackendController {
$this->toolbarItems['liveSearch'] = $search;
}
$toolbar = '<ul id="typo3-toolbar">';
$toolbar .= ('<li>' . $this->getLoggedInUserLabel()) . '</li>';
$toolbar .= ('<li class="separator"><div id="logout-button" class="toolbar-item no-separator">' . $this->moduleMenu->renderLogoutButton()) . '</div></li>';
$toolbar .= '<li>' . $this->getLoggedInUserLabel() . '</li>';
$toolbar .= '<li class="separator"><div id="logout-button" class="toolbar-item no-separator">' . $this->moduleMenu->renderLogoutButton() . '</div></li>';
$i = 0;
foreach ($this->toolbarItems as $key => $toolbarItem) {
$i++;
......@@ -276,7 +276,7 @@ class BackendController {
$additionalAttributes .= 'class="separator"';
}
}
$toolbar .= ((('<li' . $additionalAttributes) . '>') . $menu) . '</li>';
$toolbar .= '<li' . $additionalAttributes . '>' . $menu . '</li>';
}
}
return $toolbar . '</ul>';
......@@ -302,10 +302,10 @@ class BackendController {
// Superuser mode
if ($GLOBALS['BE_USER']->user['ses_backuserid']) {
$css .= ' su-user';
$title = ($GLOBALS['LANG']->getLL('switchtouser') . ': ') . $username;
$label = ($GLOBALS['LANG']->getLL('switchtousershort') . ' ') . ($realName ? (($realName . ' (') . $username) . ')' : $username);
$title = $GLOBALS['LANG']->getLL('switchtouser') . ': ' . $username;
$label = $GLOBALS['LANG']->getLL('switchtousershort') . ' ' . ($realName ? $realName . ' (' . $username . ')' : $username);
}
return (((((((((('<div id="username" class="' . $css) . '">') . $link) . $icon) . '<span title="') . htmlspecialchars($title)) . '">') . htmlspecialchars($label)) . '</span>') . ($link ? '</a>' : '')) . '</div>';
return '<div id="username" class="' . $css . '">' . $link . $icon . '<span title="' . htmlspecialchars($title) . '">' . htmlspecialchars($label) . '</span>' . ($link ? '</a>' : '') . '</div>';
}
/**
......@@ -316,7 +316,7 @@ class BackendController {
*/
protected function getLocalLangFileName() {
$code = $this->generateLocalLang();
$filePath = ('typo3temp/locallang-BE-' . sha1($code)) . '.js';
$filePath = 'typo3temp/locallang-BE-' . sha1($code) . '.js';
if (!file_exists((PATH_site . $filePath))) {
// writeFileToTypo3tempDir() returns NULL on success (please double-read!)
if (\TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir(PATH_site . $filePath, $code) !== NULL) {
......@@ -416,10 +416,10 @@ class BackendController {
// Then loop over every single label
foreach ($categoryLabels as $label) {
// LLL identifier must be called $categoryName_$label, e.g. liveSearch_loadingText
$generatedLabels[$categoryName][$label] = $GLOBALS['LANG']->getLL(($categoryName . '_') . $label);
$generatedLabels[$categoryName][$label] = $GLOBALS['LANG']->getLL($categoryName . '_' . $label);
}
}
return ('TYPO3.LLL = ' . json_encode($generatedLabels)) . ';';
return 'TYPO3.LLL = ' . json_encode($generatedLabels) . ';';
}
/**
......@@ -470,8 +470,8 @@ class BackendController {
),
'firstWebmountPid' => intval($GLOBALS['WEBMOUNTS'][0])
);
$this->js .= (('
TYPO3.configuration = ' . json_encode($t3Configuration)) . ';
$this->js .= '
TYPO3.configuration = ' . json_encode($t3Configuration) . ';
/**
* TypoSetup object.
......@@ -507,7 +507,7 @@ class BackendController {
top.goToModule = function(modName, cMR_flag, addGetVars) {
TYPO3.ModuleMenu.App.showModule(modName, addGetVars);
}
') . $this->setStartupModule();
' . $this->setStartupModule();
// Check editing of page:
$this->handlePageEditing();
}
......@@ -527,7 +527,7 @@ class BackendController {
$editRecord = '';
if ($editId) {
// Looking up the page to edit, checking permissions:
$where = (((' AND (' . $GLOBALS['BE_USER']->getPagePermsClause(2)) . ' OR ') . $GLOBALS['BE_USER']->getPagePermsClause(16)) . ')';
$where = ' AND (' . $GLOBALS['BE_USER']->getPagePermsClause(2) . ' OR ' . $GLOBALS['BE_USER']->getPagePermsClause(16) . ')';
if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($editId)) {
$editRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $editId, '*', $where);
} else {
......@@ -540,9 +540,9 @@ class BackendController {
// If the page was accessible, then let the user edit it.
if (is_array($editRecord) && $GLOBALS['BE_USER']->isInWebMount($editRecord['uid'])) {
// Setting JS code to open editing:
$this->js .= ('
$this->js .= '
// Load page to edit:
window.setTimeout("top.loadEditId(' . intval($editRecord['uid'])) . ');", 500);
window.setTimeout("top.loadEditId(' . intval($editRecord['uid']) . ');", 500);
';
// Checking page edit parameter:
if (!$GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_dontSetPageTree')) {
......@@ -551,9 +551,9 @@ class BackendController {
\TYPO3\CMS\Backend\Utility\BackendUtility::openPageTree(intval($editRecord['pid']), !$bookmarkKeepExpanded);
}
} else {
$this->js .= ('
$this->js .= '
// Warning about page editing:
alert(' . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->getLL('noEditPage'), $editId))) . ');
alert(' . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->getLL('noEditPage'), $editId)) . ');
';
}
}
......@@ -575,9 +575,9 @@ class BackendController {
}
$moduleParameters = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('modParams');
if ($startModule) {
return ((('
return '
// start in module:
top.startInModule = [\'' . $startModule) . '\', ') . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($moduleParameters)) . '];
top.startInModule = [\'' . $startModule . '\', ' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($moduleParameters) . '];
';
} else {
return '';
......@@ -653,7 +653,7 @@ class BackendController {
public function addToolbarItem($toolbarItemName, $toolbarItemClassName) {
$toolbarItem = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($toolbarItemClassName, $this);
if (!$toolbarItem instanceof \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface) {
throw new \UnexpectedValueException(('$toolbarItem "' . $toolbarItemName) . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195125501);
throw new \UnexpectedValueException('$toolbarItem "' . $toolbarItemName . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195125501);
}
if ($toolbarItem->checkAccess()) {
$this->toolbarItems[$toolbarItemName] = $toolbarItem;
......
......@@ -48,12 +48,12 @@ class BackendLayoutWizardController {
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\StandardDocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$pageRenderer = $this->doc->getPageRenderer();
$pageRenderer->addJsFile(($GLOBALS['BACK_PATH'] . TYPO3_MOD_PATH) . 'res/grideditor.js');
$pageRenderer->addJsInlineCode('storeData', ((((((((((((('
$pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . TYPO3_MOD_PATH . 'res/grideditor.js');
$pageRenderer->addJsInlineCode('storeData', '
function storeData(data) {
if (parent.opener && parent.opener.document && parent.opener.document.' . $this->formName) . ' && parent.opener.document.') . $this->formName) . '["') . $this->fieldName) . '"]) {
parent.opener.document.') . $this->formName) . '["') . $this->fieldName) . '"].value = data;
parent.opener.TBE_EDITOR.fieldChanged("backend_layout","') . $uid) . '","config","data[backend_layout][') . $uid) . '][config]");
if (parent.opener && parent.opener.document && parent.opener.document.' . $this->formName . ' && parent.opener.document.' . $this->formName . '["' . $this->fieldName . '"]) {
parent.opener.document.' . $this->formName . '["' . $this->fieldName . '"].value = data;
parent.opener.TBE_EDITOR.fieldChanged("backend_layout","' . $uid . '","config","data[backend_layout][' . $uid . '][config]");
}
}
', FALSE);
......@@ -129,7 +129,7 @@ class BackendLayoutWizardController {
$cellData[] = 'rowspan:1';
}
if (isset($column['name'])) {
$cellData[] = ('name:\'' . $column['name']) . '\'';
$cellData[] = 'name:\'' . $column['name'] . '\'';
}
if (isset($column['colPos'])) {
$cellData[] = 'column:' . $column['colPos'];
......@@ -151,11 +151,11 @@ class BackendLayoutWizardController {
$t3GridData .= implode(',', $rows) . ']';
}
$pageRenderer->enableExtJSQuickTips();
$pageRenderer->addExtOnReadyCode(((((('
$pageRenderer->addExtOnReadyCode('
t3Grid = new TYPO3.Backend.t3Grid({
data: ' . $t3GridData) . ',
colCount: ') . $colCount) . ',
rowCount: ') . $rowCount) . ',
data: ' . $t3GridData . ',
colCount: ' . $colCount . ',
rowCount: ' . $rowCount . ',
targetElement: \'editor\'
});
t3Grid.drawTable();
......@@ -170,11 +170,11 @@ class BackendLayoutWizardController {
* @todo Define visibility
*/
public function main() {
$content .= ((('<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE)) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save')) . '</a>';
$content .= ((('<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE)) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close')) . '</a>';
$content .= ((('<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE)) . '" onclick="window.close();return true;">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close')) . '</a>';
$content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save') . '</a>';
$content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close') . '</a>';
$content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close') . '</a>';
$content .= $this->doc->spacer(10);
$content .= ((((((('
$content .= '
<table border="0" width="100%" height="100%" id="outer_container">
<tr>
<td class="editor_cell">
......@@ -182,20 +182,20 @@ class BackendLayoutWizardController {
</div>
</td>
<td width="20" valign="center">
<a class="addCol" href="#" title="' . $GLOBALS['LANG']->getLL('grid_addColumn')) . '" onclick="t3Grid.addColumn(); t3Grid.drawTable(\'editor\');">
<a class="addCol" href="#" title="' . $GLOBALS['LANG']->getLL('grid_addColumn') . '" onclick="t3Grid.addColumn(); t3Grid.drawTable(\'editor\');">
<img src="res/t3grid-tableright.png" border="0" />
</a><br />
<a class="removeCol" href="#" title="') . $GLOBALS['LANG']->getLL('grid_removeColumn')) . '" onclick="t3Grid.removeColumn(); t3Grid.drawTable(\'editor\');">
<a class="removeCol" href="#" title="' . $GLOBALS['LANG']->getLL('grid_removeColumn') . '" onclick="t3Grid.removeColumn(); t3Grid.drawTable(\'editor\');">
<img src="res/t3grid-tableleft.png" border="0" />
</a>
</td>
</tr>
<tr>
<td colspan="2" height="20" align="center">
<a class="addCol" href="#" title="') . $GLOBALS['LANG']->getLL('grid_addRow')) . '" onclick="t3Grid.addRow(); t3Grid.drawTable(\'editor\');">
<a class="addCol" href="#" title="' . $GLOBALS['LANG']->getLL('grid_addRow') . '" onclick="t3Grid.addRow(); t3Grid.drawTable(\'editor\');">
<img src="res/t3grid-tabledown.png" border="0" />
</a>
<a class="removeCol" href="#" title="') . $GLOBALS['LANG']->getLL('grid_removeRow')) . '" onclick="t3Grid.removeRow(); t3Grid.drawTable(\'editor\');">
<a class="removeCol" href="#" title="' . $GLOBALS['LANG']->getLL('grid_removeRow') . '" onclick="t3Grid.removeRow(); t3Grid.drawTable(\'editor\');">
<img src="res/t3grid-tableup.png" border="0" />
</a>
</td>
......
......@@ -76,7 +76,7 @@ class ClickMenuController {
$this->MCONF['name'] = 'xMOD_alt_clickmenu.php';
// Takes the backPath as a parameter BUT since we are worried about someone forging a backPath (XSS security hole) we will check with sent md5 hash:
$inputBP = explode('|', $this->backPath);
if (count($inputBP) == 2 && $inputBP[1] == \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5(($inputBP[0] . '|') . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
if (count($inputBP) == 2 && $inputBP[1] == \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5($inputBP[0] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
$this->backPath = $inputBP[0];
} else {
$this->backPath = $GLOBALS['BACK_PATH'];
......@@ -106,11 +106,11 @@ class ClickMenuController {
// default is 5
// Setting the JavaScript controlling the timer on the page
$listFrameDoc = $this->reloadListFrame != 2 ? 'top.content.list_frame' : 'top.content';
$this->doc->JScode .= $this->doc->wrapScriptTags(((((('
$this->doc->JScode .= $this->doc->wrapScriptTags('
var date = new Date();
var mo_timeout = Math.floor(date.getTime()/1000);
roImg = "' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-status-current')) . '";
roImg = "' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-status-current') . '";
routImg = "t3-icon-empty";
......@@ -130,7 +130,7 @@ class ClickMenuController {
}
function timeout_func() { //
date = new Date();
if (Math.floor(date.getTime()/1000)-mo_timeout > ') . $secs) . ') {
if (Math.floor(date.getTime()/1000)-mo_timeout > ' . $secs . ') {
hideCM();
return false;
} else {
......@@ -145,9 +145,9 @@ class ClickMenuController {
// Start timer
timeout_func();
') . ($this->reloadListFrame ? ((((('
' . ($this->reloadListFrame ? '
// Reload list frame:
if(' . $listFrameDoc) . '){') . $listFrameDoc) . '.location.href=') . $listFrameDoc) . '.location.href;}' : '')) . '
if(' . $listFrameDoc . '){' . $listFrameDoc . '.location.href=' . $listFrameDoc . '.location.href;}' : '') . '
');
}
......@@ -198,7 +198,7 @@ class ClickMenuController {
echo $this->content;
} else {
header('Content-Type: text/xml');
echo ((('<?xml version="1.0"?>' . LF) . '<t3ajax>') . $this->content) . '</t3ajax>';
echo '<?xml version="1.0"?>' . LF . '<t3ajax>' . $this->content . '</t3ajax>';
}
}
......
......@@ -87,7 +87,7 @@ class ElementHistoryController {
// Start history object
$historyObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
if ($historyObj->returnUrl) {
$buttons['back'] = ((('<a href="' . htmlspecialchars($historyObj->returnUrl)) . '" class="typo3-goBack">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back')) . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
return $buttons;
}
......
......@@ -109,9 +109,9 @@ class MoveElementController {
$hline .= \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($this->table, $elRow, TRUE);
// Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
$hline .= $this->doc->spacer(5);
$onClick = ('window.location.href=\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('makeCopy' => !$this->makeCopy))) . '\';';
$onClick = 'window.location.href=\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('makeCopy' => !$this->makeCopy)) . '\';';
$hline .= $this->doc->spacer(5);
$hline .= (((((('<input type="hidden" name="makeCopy" value="0" />' . '<input type="checkbox" name="makeCopy" id="makeCopy" value="1"') . ($this->makeCopy ? ' checked="checked"' : '')) . ' onclick="') . htmlspecialchars($onClick)) . '" /> <label for="makeCopy" class="t3-label-valign-top">') . $GLOBALS['LANG']->getLL('makeCopy', 1)) . '</label>';
$hline .= '<input type="hidden" name="makeCopy" value="0" />' . '<input type="checkbox" name="makeCopy" id="makeCopy" value="1"' . ($this->makeCopy ? ' checked="checked"' : '') . ' onclick="' . htmlspecialchars($onClick) . '" /> <label for="makeCopy" class="t3-label-valign-top">' . $GLOBALS['LANG']->getLL('makeCopy', 1) . '</label>';
// Add the header-content to the module content:
$this->content .= $this->doc->section('', $hline, FALSE, TRUE);
$this->content .= $this->doc->spacer(20);
......@@ -130,9 +130,9 @@ class MoveElementController {
$pidPageInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
if (is_array($pidPageInfo)) {
if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
$code .= (((('<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid)))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up')) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE)) . '</a><br />';
$code .= '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
} else {
$code .= (\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE)) . '<br />';
$code .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
}
}
}
......@@ -177,12 +177,12 @@ class MoveElementController {
$pidPageInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
if (is_array($pidPageInfo)) {
if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
$code .= (((('<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
$code .= '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
'uid' => intval($pageinfo['pid']),
'moveUid' => $this->moveUid
)))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up')) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE)) . '</a><br />';
))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
} else {
$code .= (\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE)) . '<br />';
$code .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
}
}
}
......@@ -234,7 +234,7 @@ class MoveElementController {
}
if ($this->R_URI) {
// Back
$buttons['back'] = ((((('<a href="' . htmlspecialchars($this->R_URI)) . '" class="typo3-goBack" title="') . $GLOBALS['LANG']->getLL('goBack', TRUE)) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back')) . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
}
return $buttons;
......
......@@ -171,9 +171,9 @@ class NewContentElementController {
$this->elementWrapper = $this-></