Commit 5422f6aa authored by Arvid Jakobsson's avatar Arvid Jakobsson Committed by Jigal van Hemert
Browse files

[TASK] Remove superfluous parenthesis in sysexts

Removes superfluous parenthesis in sysexts "sv", "sys_action",
"sys_note" and "t3editor".

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

Change-Id: Ib4b3541051a30895d6657b6af367f9c6c58dac44
Resolves: #40971
Related: #40095
Reviewed-on: http://review.typo3.org/14630
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
parent 6a0863cf
......@@ -69,8 +69,8 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
$isProcessed = FALSE;
}
if (!empty($loginData['uident_text'])) {
$loginData['uident_challenged'] = (string) md5((((($loginData['uname'] . ':') . $loginData['uident_text']) . ':') . $loginData['chalvalue']));
$loginData['uident_superchallenged'] = (string) md5((((($loginData['uname'] . ':') . md5($loginData['uident_text'])) . ':') . $loginData['chalvalue']));
$loginData['uident_challenged'] = (string) md5(($loginData['uname'] . ':' . $loginData['uident_text'] . ':' . $loginData['chalvalue']));
$loginData['uident_superchallenged'] = (string) md5(($loginData['uname'] . ':' . md5($loginData['uident_text']) . ':' . $loginData['chalvalue']));
$this->processOriginalPasswordValue($loginData);
$isProcessed = TRUE;
}
......@@ -146,7 +146,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
}
}
// Checking the domain (lockToDomain)
if (($OK && $user['lockToDomain']) && $user['lockToDomain'] != $this->authInfo['HTTP_HOST']) {
if ($OK && $user['lockToDomain'] && $user['lockToDomain'] != $this->authInfo['HTTP_HOST']) {
// Lock domain didn't match, so error:
if ($this->writeAttemptLog) {
$this->writelog(255, 3, 3, 1, 'Login-attempt from %s (%s), username \'%s\', locked domain \'%s\' did not match \'%s\'!', array($this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $user[$this->db_user['username_column']], $user['lockToDomain'], $this->authInfo['HTTP_HOST']));
......@@ -179,7 +179,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
// ADD group-numbers if the IPmask matches.
if (is_array($TYPO3_CONF_VARS['FE']['IPmaskMountGroups'])) {
foreach ($TYPO3_CONF_VARS['FE']['IPmaskMountGroups'] as $IPel) {
if (($this->authInfo['REMOTE_ADDR'] && $IPel[0]) && \TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP($this->authInfo['REMOTE_ADDR'], $IPel[0])) {
if ($this->authInfo['REMOTE_ADDR'] && $IPel[0] && \TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP($this->authInfo['REMOTE_ADDR'], $IPel[0])) {
$groups[] = intval($IPel[1]);
}
}
......@@ -190,11 +190,11 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
if ($this->writeDevLog) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Get usergroups with id: ' . $list, 'TYPO3\\CMS\\Sv\\AuthenticationService');
}
$lockToDomain_SQL = (' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . $this->authInfo['HTTP_HOST']) . '\')';
$lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . $this->authInfo['HTTP_HOST'] . '\')';
if (!$this->authInfo['showHiddenRecords']) {
$hiddenP = 'AND hidden=0 ';
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->db_groups['table'], (((('deleted=0 ' . $hiddenP) . ' AND uid IN (') . $list) . ')') . $lockToDomain_SQL);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->db_groups['table'], 'deleted=0 ' . $hiddenP . ' AND uid IN (' . $list . ')' . $lockToDomain_SQL);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$groupDataArr[$row['uid']] = $row;
}
......@@ -225,11 +225,11 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
*/
public function getSubGroups($grList, $idList = '', &$groups) {
// Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
$lockToDomain_SQL = (' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . $this->authInfo['HTTP_HOST']) . '\')';
$lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . $this->authInfo['HTTP_HOST'] . '\')';
if (!$this->authInfo['showHiddenRecords']) {
$hiddenP = 'AND hidden=0 ';
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,subgroup', 'fe_groups', (((('deleted=0 ' . $hiddenP) . ' AND uid IN (') . $grList) . ')') . $lockToDomain_SQL);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,subgroup', 'fe_groups', 'deleted=0 ' . $hiddenP . ' AND uid IN (' . $grList . ')' . $lockToDomain_SQL);
// Internal group record storage
$groupRows = array();
// The groups array is filled
......@@ -252,7 +252,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
// Make integer list
$theList = implode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $row['subgroup']));
// Call recursively, pass along list of already processed groups so they are not recursed again.
$this->getSubGroups($theList, ($idList . ',') . $uid, $groups);
$this->getSubGroups($theList, $idList . ',' . $uid, $groups);
}
}
}
......
......@@ -47,7 +47,7 @@ class LoginFormHook {
case 'superchallenged':
$_SESSION['login_challenge'] = $this->getChallenge();
$content = ((((('<form action="index.php" method="post" name="loginform" ' . 'onsubmit="doChallengeResponse(') . ($pObj->loginSecurityLevel == 'challenged' ? 0 : 1)) . ');">') . '<input type="hidden" name="challenge" value="') . htmlspecialchars($_SESSION['login_challenge'])) . '" />';
$content = '<form action="index.php" method="post" name="loginform" ' . 'onsubmit="doChallengeResponse(' . ($pObj->loginSecurityLevel == 'challenged' ? 0 : 1) . ');">' . '<input type="hidden" name="challenge" value="' . htmlspecialchars($_SESSION['login_challenge']) . '" />';
break;
case 'normal':
$content = '<form action="index.php" method="post" name="loginform" onsubmit="document.loginform.userident.value=document.loginform.p_field.value;document.loginform.p_field.value=\'\';return true;">';
......
......@@ -69,8 +69,8 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
* @return string The help content for this module.
*/
protected function renderHelp() {
$help = ('<p class="help">' . $GLOBALS['LANG']->getLL('report_explanation')) . '</p>';
$help .= ('<p class="help">' . $GLOBALS['LANG']->getLL('externals_explanation')) . '</p><br />';
$help = '<p class="help">' . $GLOBALS['LANG']->getLL('report_explanation') . '</p>';
$help .= '<p class="help">' . $GLOBALS['LANG']->getLL('externals_explanation') . '</p><br />';
return $help;
}
......@@ -96,17 +96,17 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
* @return string Service list as HTML for one service type
*/
protected function renderServiceTypeList($serviceType, $services) {
$header = ('<h4>' . sprintf($GLOBALS['LANG']->getLL('service_type'), $serviceType)) . '</h4>';
$serviceList = ((((((((((((('
$header = '<h4>' . sprintf($GLOBALS['LANG']->getLL('service_type'), $serviceType) . '</h4>';
$serviceList = '
<table cellspacing="1" cellpadding="2" border="0" class="tx_sv_reportlist services">
<tr class="t3-row-header">
<td style="width: 35%">' . $GLOBALS['LANG']->getLL('service')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('priority')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('quality')) . '</td>
<td style="width: 35%">') . $GLOBALS['LANG']->getLL('subtypes')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('os')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('externals')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('available')) . '</td>
<td style="width: 35%">' . $GLOBALS['LANG']->getLL('service') . '</td>
<td>' . $GLOBALS['LANG']->getLL('priority') . '</td>
<td>' . $GLOBALS['LANG']->getLL('quality') . '</td>
<td style="width: 35%">' . $GLOBALS['LANG']->getLL('subtypes') . '</td>
<td>' . $GLOBALS['LANG']->getLL('os') . '</td>
<td>' . $GLOBALS['LANG']->getLL('externals') . '</td>
<td>' . $GLOBALS['LANG']->getLL('available') . '</td>
</tr>';
foreach ($services as $serviceKey => $serviceInformation) {
$serviceList .= $this->renderServiceRow($serviceKey, $serviceInformation);
......@@ -125,12 +125,12 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
* @return string HTML row for the service.
*/
protected function renderServiceRow($serviceKey, $serviceInformation) {
$serviceDescription = ((((('
$serviceDescription = '
<p class="service-header">
<span class="service-title">' . $serviceInformation['title']) . '</span> (') . $serviceInformation['extKey']) . ': ') . $serviceKey) . ')
<span class="service-title">' . $serviceInformation['title'] . '</span> (' . $serviceInformation['extKey'] . ': ' . $serviceKey . ')
</p>';
if (!empty($serviceInformation['description'])) {
$serviceDescription .= ('<p class="service-description">' . $serviceInformation['description']) . '</p>';
$serviceDescription .= '<p class="service-description">' . $serviceInformation['description'] . '</p>';
}
$serviceSubtypes = empty($serviceInformation['serviceSubTypes']) ? '-' : implode(', ', $serviceInformation['serviceSubTypes']);
$serviceOperatingSystem = empty($serviceInformation['os']) ? $GLOBALS['LANG']->getLL('any') : $serviceInformation['os'];
......@@ -146,15 +146,15 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
} catch (\TYPO3\CMS\Core\Exception $e) {
}
$serviceRow = ((((((((((((((((((((((((((('
$serviceRow = '
<tr class="service">
<td class="first-cell ' . $serviceAvailabilityClass) . '">') . $serviceDescription) . '</td>
<td class="cell ') . $serviceAvailabilityClass) . '">') . $serviceInformation['priority']) . '</td>
<td class="cell ') . $serviceAvailabilityClass) . '">') . $serviceInformation['quality']) . '</td>
<td class="cell ') . $serviceAvailabilityClass) . '">') . $serviceSubtypes) . '</td>
<td class="cell ') . $serviceAvailabilityClass) . '">') . $serviceOperatingSystem) . '</td>
<td class="cell ') . $serviceAvailabilityClass) . '">') . $serviceRequiredExecutables) . '</td>
<td class="last-cell ') . $serviceAvailabilityClass) . '">') . $serviceAvailable) . '</td>
<td class="first-cell ' . $serviceAvailabilityClass . '">' . $serviceDescription . '</td>
<td class="cell ' . $serviceAvailabilityClass . '">' . $serviceInformation['priority'] . '</td>
<td class="cell ' . $serviceAvailabilityClass . '">' . $serviceInformation['quality'] . '</td>
<td class="cell ' . $serviceAvailabilityClass . '">' . $serviceSubtypes . '</td>
<td class="cell ' . $serviceAvailabilityClass . '">' . $serviceOperatingSystem . '</td>
<td class="cell ' . $serviceAvailabilityClass . '">' . $serviceRequiredExecutables . '</td>
<td class="last-cell ' . $serviceAvailabilityClass . '">' . $serviceAvailable . '</td>
</tr>';
return $serviceRow;
}
......@@ -166,16 +166,16 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
*/
protected function renderExecutablesSearchPathList() {
$searchPaths = \TYPO3\CMS\Core\Utility\CommandUtility::getPaths(TRUE);
$content = ('<br /><h3 class="divider">' . $GLOBALS['LANG']->getLL('search_paths')) . '</h3>';
$content = '<br /><h3 class="divider">' . $GLOBALS['LANG']->getLL('search_paths') . '</h3>';
if (count($searchPaths) == 0) {
$content .= ('<p>' . $GLOBALS['LANG']->getLL('no_search_paths')) . '</p>';
$content .= '<p>' . $GLOBALS['LANG']->getLL('no_search_paths') . '</p>';
} else {
$content .= ((('
$content .= '
<table cellspacing="1" cellpadding="2" border="0" class="tx_sv_reportlist paths">
<thead>
<tr class="t3-row-header">
<td>' . $GLOBALS['LANG']->getLL('path')) . '</td>
<td>') . $GLOBALS['LANG']->getLL('valid')) . '</td>
<td>' . $GLOBALS['LANG']->getLL('path') . '</td>
<td>' . $GLOBALS['LANG']->getLL('valid') . '</td>
</tr>
</thead>
<tbody>';
......@@ -186,10 +186,10 @@ class ServicesListReport implements \TYPO3\CMS\Reports\ReportInterface {
$pathAccessibleClass = 'typo3-message message-ok';
$pathAccessible = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
}
$content .= ((((((('
$content .= '
<tr>
<td class="first-cell ' . $pathAccessibleClass) . '">') . \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($path)) . '</td>
<td class="last-cell ') . $pathAccessibleClass) . '">') . $pathAccessible) . '</td>
<td class="first-cell ' . $pathAccessibleClass . '">' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($path) . '</td>
<td class="last-cell ' . $pathAccessibleClass . '">' . $pathAccessible . '</td>
</tr>';
}
$content .= '
......
......@@ -16,6 +16,6 @@ if (!defined('TYPO3_MODE')) {
'className' => 'TYPO3\\CMS\\Sv\\AuthenticationService'
));
// Add hooks to the backend login form
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginFormHook'][$_EXTKEY] = ('EXT:' . $_EXTKEY) . '/class.tx_sv_loginformhook.php:TYPO3\\CMS\\Sv\\LoginFormHook->getLoginFormTag';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginScriptHook'][$_EXTKEY] = ('EXT:' . $_EXTKEY) . '/class.tx_sv_loginformhook.php:TYPO3\\CMS\\Sv\\LoginFormHook->getLoginScripts';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginFormHook'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/class.tx_sv_loginformhook.php:TYPO3\\CMS\\Sv\\LoginFormHook->getLoginFormTag';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginScriptHook'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/class.tx_sv_loginformhook.php:TYPO3\\CMS\\Sv\\LoginFormHook->getLoginScripts';
?>
\ No newline at end of file
......@@ -52,10 +52,10 @@ class ActionToolbarMenu implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInt
$this->addJavascriptToBackend();
$this->addCssToBackend();
$title = $GLOBALS['LANG']->getLL('action_toolbaritem', TRUE);
$actionMenu[] = ('<a href="#" class="toolbar-item">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-toolbar-menu-actions', array('title' => $title))) . '</a>';
$actionMenu[] = '<a href="#" class="toolbar-item">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-toolbar-menu-actions', array('title' => $title)) . '</a>';
$actionMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
foreach ($actionEntries as $linkConf) {
$actionMenu[] = (((('<li><a href="' . htmlspecialchars($linkConf[1])) . '" target="content">') . $linkConf[2]) . htmlspecialchars($linkConf[0])) . '</a></li>';
$actionMenu[] = '<li><a href="' . htmlspecialchars($linkConf[1]) . '" target="content">' . $linkConf[2] . htmlspecialchars($linkConf[0]) . '</a></li>';
}
$actionMenu[] = '</ul>';
return implode('
......@@ -81,7 +81,7 @@ class ActionToolbarMenu implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInt
if ($GLOBALS['BE_USER']->groupList) {
$groupList = $GLOBALS['BE_USER']->groupList;
}
$queryResource = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('sys_action.*', 'sys_action', 'sys_action_asgr_mm', 'be_groups', (' AND be_groups.uid IN (' . $groupList) . ') AND sys_action.pid = 0 AND sys_action.hidden = 0', 'sys_action.uid', 'sys_action.sorting');
$queryResource = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('sys_action.*', 'sys_action', 'sys_action_asgr_mm', 'be_groups', ' AND be_groups.uid IN (' . $groupList . ') AND sys_action.pid = 0 AND sys_action.hidden = 0', 'sys_action.uid', 'sys_action.sorting');
}
if ($queryResource) {
while ($actionRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($queryResource)) {
......
......@@ -39,8 +39,8 @@ class SysNoteRepository {
* @return array records
*/
public function findAllByPidList($pidlist) {
$records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_note', (((('pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($pidlist)) . ')
AND (personal=0 OR cruser=') . intval($GLOBALS['BE_USER']->user['uid'])) . ')') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_note'), '', 'sorting');
$records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_note', 'pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($pidlist) . ')
AND (personal=0 OR cruser=' . intval($GLOBALS['BE_USER']->user['uid']) . ')' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_note'), '', 'sorting');
// exec_SELECTgetRows can return NULL if the query failed. This is
// transformed here to an empty array instead.
if ($records === NULL) {
......
......@@ -38,7 +38,7 @@ class EditLinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHe
*/
public function render($id) {
$returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI');
return ((($GLOBALS['BACK_PATH'] . 'alt_doc.php?&edit[sys_note][') . $id) . ']=edit&returnUrl=') . rawurlencode($returnUrl);
return $GLOBALS['BACK_PATH'] . 'alt_doc.php?&edit[sys_note][' . $id . ']=edit&returnUrl=' . rawurlencode($returnUrl);
}
}
......
......@@ -3,9 +3,9 @@ if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Hook into the list module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook'][$_EXTKEY] = ('EXT:' . $_EXTKEY) . '/Classes/Hooks/RecordList.php:Tx_Sysnote_Hooks_RecordList->render';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/Classes/Hooks/RecordList.php:Tx_Sysnote_Hooks_RecordList->render';
// Hook into the page module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawFooterHook'][$_EXTKEY] = ('EXT:' . $_EXTKEY) . '/Classes/Hooks/Page.php:Tx_Sysnote_Hooks_Page->render';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawFooterHook'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/Classes/Hooks/Page.php:Tx_Sysnote_Hooks_Page->render';
// Hook into the info module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'][$_EXTKEY] = ('EXT:' . $_EXTKEY) . '/Classes/Hooks/InfoModule.php:Tx_Sysnote_Hooks_InfoModule->render';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/Classes/Hooks/InfoModule.php:Tx_Sysnote_Hooks_InfoModule->render';
?>
\ No newline at end of file
......@@ -27,9 +27,9 @@ class FormWizard {
}
$config = $GLOBALS['TCA'][$parameters['table']]['columns'][$parameters['field']]['config'];
$doc = $GLOBALS['SOBE']->doc;
$attributes = ((((((((((('rows="' . $config['rows']) . '" ') . 'cols="') . $config['cols']) . '" ') . 'wrap="off" ') . 'style="') . $config['wizards']['t3editor']['params']['style']) . '" ') . 'onchange="') . $parameters['fieldChangeFunc']['TBE_EDITOR_fieldChanged']) . '" ';
$attributes = 'rows="' . $config['rows'] . '" ' . 'cols="' . $config['cols'] . '" ' . 'wrap="off" ' . 'style="' . $config['wizards']['t3editor']['params']['style'] . '" ' . 'onchange="' . $parameters['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] . '" ';
$parameters['item'] = '';
$parameters['item'] .= $t3editor->getCodeEditor($parameters['itemName'], 'fixed-font enable-tab', $parameters['row'][$parameters['field']], $attributes, ($parameters['table'] . ' > ') . $parameters['field'], array(
$parameters['item'] .= $t3editor->getCodeEditor($parameters['itemName'], 'fixed-font enable-tab', $parameters['row'][$parameters['field']], $attributes, $parameters['table'] . ' > ' . $parameters['field'], array(
'target' => intval($pObj->target)
));
$parameters['item'] .= $t3editor->getJavascriptCode($doc);
......
......@@ -74,8 +74,8 @@ class FileEditHook {
if (!$t3editor->isEnabled() || !$t3editor->getMode()) {
return;
}
$attributes = ('rows="30" ' . 'wrap="off" ') . $pObj->doc->formWidthText(48, 'width:98%;height:60%', 'off');
$title = ($GLOBALS['LANG']->getLL('file') . ' ') . htmlspecialchars($pObj->target);
$attributes = 'rows="30" ' . 'wrap="off" ' . $pObj->doc->formWidthText(48, 'width:98%;height:60%', 'off');
$title = $GLOBALS['LANG']->getLL('file') . ' ' . htmlspecialchars($pObj->target);
$outCode = $t3editor->getCodeEditor('file[editfile][0][data]', 'fixed-font enable-tab', '$1', $attributes, $title, array(
'target' => intval($pObj->target)
));
......
......@@ -60,12 +60,12 @@ class TypoScriptTemplateInfoHook {
}
foreach (array('constants', 'config') as $type) {
if ($parameters['e'][$type]) {
$attributes = ((('rows="' . $parameters['numberOfRows']) . '" ') . 'wrap="off" ') . $pObj->pObj->doc->formWidthText(48, 'width:98%;height:60%', 'off');
$title = (((($GLOBALS['LANG']->getLL('template') . ' ') . htmlspecialchars($parameters['tplRow']['title'])) . $GLOBALS['LANG']->getLL('delimiter')) . ' ') . $GLOBALS['LANG']->getLL($type);
$outCode = $t3editor->getCodeEditor(('data[' . $type) . ']', 'fixed-font enable-tab', '$1', $attributes, $title, array(
$attributes = 'rows="' . $parameters['numberOfRows'] . '" ' . 'wrap="off" ' . $pObj->pObj->doc->formWidthText(48, 'width:98%;height:60%', 'off');
$title = $GLOBALS['LANG']->getLL('template') . ' ' . htmlspecialchars($parameters['tplRow']['title']) . $GLOBALS['LANG']->getLL('delimiter') . ' ' . $GLOBALS['LANG']->getLL($type);
$outCode = $t3editor->getCodeEditor('data[' . $type . ']', 'fixed-font enable-tab', '$1', $attributes, $title, array(
'pageId' => intval($pObj->pObj->id)
));
$parameters['theOutput'] = preg_replace(('/\\<textarea name="data\\[' . $type) . '\\]".*\\>([^\\<]*)\\<\\/textarea\\>/mi', $outCode, $parameters['theOutput']);
$parameters['theOutput'] = preg_replace('/\\<textarea name="data\\[' . $type . '\\]".*\\>([^\\<]*)\\<\\/textarea\\>/mi', $outCode, $parameters['theOutput']);
}
}
}
......
......@@ -159,7 +159,7 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$pageRenderer->loadPrototype();
$pageRenderer->loadScriptaculous();
// Include editor-css
$content .= ('<link href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::createVersionNumberedFilename((($GLOBALS['BACK_PATH'] . \t3lib_extmgm::extRelPath('t3editor')) . 'res/css/t3editor.css'))) . '" type="text/css" rel="stylesheet" />';
$content .= '<link href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::createVersionNumberedFilename(($GLOBALS['BACK_PATH'] . \t3lib_extmgm::extRelPath('t3editor') . 'res/css/t3editor.css')) . '" type="text/css" rel="stylesheet" />';
// Include editor-js-lib
$doc->loadJavascriptLib($path_codemirror . 'codemirror.js');
$doc->loadJavascriptLib($path_t3e . 'res/jslib/t3editor.js');
......@@ -190,12 +190,12 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$path_t3e = $GLOBALS['BACK_PATH'] . \t3lib_extmgm::extRelPath('t3editor');
$content = '';
if ($this->mode === self::MODE_TYPOSCRIPT) {
$content .= (('<script type="text/javascript" src="' . $path_t3e) . 'res/jslib/ts_codecompletion/tsref.js') . '"></script>';
$content .= (('<script type="text/javascript" src="' . $path_t3e) . 'res/jslib/ts_codecompletion/completionresult.js') . '"></script>';
$content .= (('<script type="text/javascript" src="' . $path_t3e) . 'res/jslib/ts_codecompletion/tsparser.js') . '"></script>';
$content .= (('<script type="text/javascript" src="' . $path_t3e) . 'res/jslib/ts_codecompletion/tscodecompletion.js') . '"></script>';
$content .= '<script type="text/javascript" src="' . $path_t3e . 'res/jslib/ts_codecompletion/tsref.js' . '"></script>';
$content .= '<script type="text/javascript" src="' . $path_t3e . 'res/jslib/ts_codecompletion/completionresult.js' . '"></script>';
$content .= '<script type="text/javascript" src="' . $path_t3e . 'res/jslib/ts_codecompletion/tsparser.js' . '"></script>';
$content .= '<script type="text/javascript" src="' . $path_t3e . 'res/jslib/ts_codecompletion/tscodecompletion.js' . '"></script>';
}
$content .= \TYPO3\CMS\Core\Utility\GeneralUtility::wrapJS(((((('T3editor.parserfile = ' . $this->getParserfileByMode($this->mode)) . ';') . LF) . 'T3editor.stylesheet = ') . $this->getStylesheetByMode($this->mode)) . ';');
$content .= \TYPO3\CMS\Core\Utility\GeneralUtility::wrapJS('T3editor.parserfile = ' . $this->getParserfileByMode($this->mode) . ';' . LF . 'T3editor.stylesheet = ' . $this->getStylesheetByMode($this->mode) . ';');
return $content;
}
......@@ -208,7 +208,7 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$T3Editor_template = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:t3editor/res/templates/t3editor.html'));
$T3Editor_template = addslashes($T3Editor_template);
$T3Editor_template = str_replace(array(CR, LF), array('', '\' + \''), $T3Editor_template);
return ('\'' . $T3Editor_template) . '\'';
return '\'' . $T3Editor_template . '\'';
}
/**
......@@ -220,8 +220,8 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
protected function getParserfileByMode($mode) {
switch ($mode) {
case self::MODE_TYPOSCRIPT:
$relPath = (($GLOBALS['BACK_PATH'] ? $GLOBALS['BACK_PATH'] : '../../../') . \t3lib_extmgm::extRelPath('t3editor')) . 'res/jslib/parse_typoscript/';
$parserfile = ((('["' . $relPath) . 'tokenizetyposcript.js", "') . $relPath) . 'parsetyposcript.js"]';
$relPath = ($GLOBALS['BACK_PATH'] ? $GLOBALS['BACK_PATH'] : '../../../') . \t3lib_extmgm::extRelPath('t3editor') . 'res/jslib/parse_typoscript/';
$parserfile = '["' . $relPath . 'tokenizetyposcript.js", "' . $relPath . 'parsetyposcript.js"]';
break;
case self::MODE_JAVASCRIPT:
$parserfile = '["tokenizejavascript.js", "parsejavascript.js"]';
......@@ -241,7 +241,7 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
case self::MODE_PHP:
case self::MODE_MIXED:
$parserfile = ((((((('[' . '"tokenizejavascript.js", ') . '"parsejavascript.js", ') . '"parsecss.js", ') . '"parsexml.js", ') . '"../contrib/php/js/tokenizephp.js", ') . '"../contrib/php/js/parsephp.js", ') . '"../contrib/php/js/parsephphtmlmixed.js"') . ']';
$parserfile = '[' . '"tokenizejavascript.js", ' . '"parsejavascript.js", ' . '"parsecss.js", ' . '"parsexml.js", ' . '"../contrib/php/js/tokenizephp.js", ' . '"../contrib/php/js/parsephp.js", ' . '"../contrib/php/js/parsephphtmlmixed.js"' . ']';
break;
}
return $parserfile;
......@@ -268,7 +268,7 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css"';
break;
case self::MODE_HTML:
$stylesheet = ('T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ') . 'T3editor.PATH_codemirror + "../css/csscolors.css"';
$stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ' . 'T3editor.PATH_codemirror + "../css/csscolors.css"';
break;
case self::MODE_SPARQL:
$stylesheet = 'T3editor.PATH_codemirror + "../css/sparqlcolors.css"';
......@@ -277,13 +277,13 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$stylesheet = 'T3editor.PATH_codemirror + "../contrib/php/css/phpcolors.css"';
break;
case self::MODE_MIXED:
$stylesheet = (('T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ') . 'T3editor.PATH_codemirror + "../css/csscolors.css", ') . 'T3editor.PATH_codemirror + "../contrib/php/css/phpcolors.css"';
$stylesheet = 'T3editor.PATH_codemirror + "../css/xmlcolors.css", ' . 'T3editor.PATH_codemirror + "../css/jscolors.css", ' . 'T3editor.PATH_codemirror + "../css/csscolors.css", ' . 'T3editor.PATH_codemirror + "../contrib/php/css/phpcolors.css"';
break;
}
if ($stylesheet != '') {
$stylesheet = ('' . $stylesheet) . ', ';
$stylesheet = '' . $stylesheet . ', ';
}
return ('[' . $stylesheet) . 'T3editor.PATH_t3e + "res/css/t3editor_inner.css"]';
return '[' . $stylesheet . 'T3editor.PATH_t3e + "res/css/t3editor_inner.css"]';
}
/**
......@@ -311,7 +311,7 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$extraction = array();
$labels = array_merge((array) $GLOBALS['LOCAL_LANG']['default'], (array) $GLOBALS['LOCAL_LANG'][$GLOBALS['LANG']->lang]);
// Regular expression to strip the selection prefix and possibly something from the label name:
$labelPattern = ((('#^' . preg_quote($selectionPrefix, '#')) . '(') . preg_quote($stripFromSelectionName, '#')) . ')?#';
$labelPattern = '#^' . preg_quote($selectionPrefix, '#') . '(' . preg_quote($stripFromSelectionName, '#') . ')?#';
// Iterate throuh all locallang lables:
foreach ($labels as $label => $value) {
if (strpos($label, $selectionPrefix) === 0) {
......@@ -340,22 +340,22 @@ class T3Editor implements \TYPO3\CMS\Core\SingletonInterface {
$class .= ' t3editor';
$alt = htmlspecialchars($alt);
if (!empty($alt)) {
$alt = (' alt="' . $alt) . '"';
$alt = ' alt="' . $alt . '"';
}
$code .= (((((((((((((('<div>' . '<textarea id="t3editor_') . $this->editorCounter) . '" ') . 'name="') . $name) . '" ') . 'class="') . $class) . '" ') . $additionalParams) . ' ') . $alt) . '>') . $content) . '</textarea></div>';
$code .= '<div>' . '<textarea id="t3editor_' . $this->editorCounter . '" ' . 'name="' . $name . '" ' . 'class="' . $class . '" ' . $additionalParams . ' ' . $alt . '>' . $content . '</textarea></div>';
$checked = $GLOBALS['BE_USER']->uc['disableT3Editor'] ? 'checked="checked"' : '';
$code .= ((((((((((((((('<br /><br />' . '<input type="checkbox" ') . 'class="checkbox t3editor_disableEditor" ') . 'onclick="T3editor.toggleEditor(this);" ') . 'name="t3editor_disableEditor" ') . 'value="true" ') . 'id="t3editor_disableEditor_') . $this->editorCounter) . '_checkbox" ') . $checked) . ' />&nbsp;') . '<label for="t3editor_disableEditor_') . $this->editorCounter) . '_checkbox">') . $GLOBALS['LANG']->getLL('deactivate')) . '</label>') . '<br /><br />';
$code .= '<br /><br />' . '<input type="checkbox" ' . 'class="checkbox t3editor_disableEditor" ' . 'onclick="T3editor.toggleEditor(this);" ' . 'name="t3editor_disableEditor" ' . 'value="true" ' . 'id="t3editor_disableEditor_' . $this->editorCounter . '_checkbox" ' . $checked . ' />&nbsp;' . '<label for="t3editor_disableEditor_' . $this->editorCounter . '_checkbox">' . $GLOBALS['LANG']->getLL('deactivate') . '</label>' . '<br /><br />';
if (count($hiddenfields)) {
foreach ($hiddenfields as $name => $value) {
$code .= ((((('<input type="hidden" ' . 'name="') . $name) . '" ') . 'value="') . $value) . '" />';
$code .= '<input type="hidden" ' . 'name="' . $name . '" ' . 'value="' . $value . '" />';
}
}
} else {
// Fallback
if (!empty($class)) {
$class = ('class="' . $class) . '" ';
$class = 'class="' . $class . '" ';
}
$code .= (((((('<textarea name="' . $name) . '" ') . $class) . $additionalParams) . '>') . $content) . '</textarea>';
$code .= '<textarea name="' . $name . '" ' . $class . $additionalParams . '>' . $content . '</textarea>';
}
return $code;
}
......
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