diff --git a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php index 4c6905e81bbb9a14885ebe4bcef791acb185b0db..855e24445ef4092c1d1553d30f5d3e029673871a 100644 --- a/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php +++ b/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php @@ -123,7 +123,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin // Is user logged in? $this->userIsLoggedIn = $GLOBALS['TSFE']->loginUser; // Redirect - if (($this->conf['redirectMode'] && !$this->conf['redirectDisable']) && !$this->noRedirect) { + if ($this->conf['redirectMode'] && !$this->conf['redirectDisable'] && !$this->noRedirect) { $redirectUrl = $this->processRedirect(); if (count($redirectUrl)) { $this->redirectUrl = $this->conf['redirectFirstMethod'] ? array_shift($redirectUrl) : array_pop($redirectUrl); @@ -145,7 +145,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin } } // Process the redirect - if ((($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) && !$this->noRedirect) { + if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl && !$this->noRedirect) { if (!$GLOBALS['TSFE']->fe_user->cookieId) { $content .= $this->cObj->stdWrap($this->pi_getLL('cookie_warning', '', 1), $this->conf['cookieWarning_stdWrap.']); } else { @@ -193,7 +193,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $row = FALSE; // Look for user record $data = $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['forgot_email'], 'fe_users'); - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password, email', 'fe_users', (((((('(email=' . $data) . ' OR username=') . $data) . ') AND pid IN (') . $GLOBALS['TYPO3_DB']->cleanIntList($this->spid)) . ') ') . $this->cObj->enableFields('fe_users')); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password, email', 'fe_users', '(email=' . $data . ' OR username=' . $data . ') AND pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->spid) . ') ' . $this->cObj->enableFields('fe_users')); if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) { $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); } @@ -262,7 +262,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $user = $this->pi_getRecord('fe_users', intval($uid)); $userHash = $user['felogin_forgotHash']; $compareHash = explode('|', $userHash); - if ((((!$compareHash || !$compareHash[1]) || $compareHash[0] < time()) || $hash[0] != $compareHash[0]) || md5($hash[1]) != $compareHash[1]) { + if (!$compareHash || !$compareHash[1] || $compareHash[0] < time() || $hash[0] != $compareHash[0] || md5($hash[1]) != $compareHash[1]) { $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_notvalid_message', $this->conf['changePasswordNotValidMessage_stdWrap.']); $subpartArray['###CHANGEPASSWORD_FORM###'] = ''; } else { @@ -326,8 +326,8 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $validEnd = time() + 3600 * $hours; $validEndString = date($this->conf['dateFormat'], $validEnd); $hash = md5(\TYPO3\CMS\Core\Utility\GeneralUtility::generateRandomBytes(64)); - $randHash = ($validEnd . '|') . $hash; - $randHashDB = ($validEnd . '|') . md5($hash); + $randHash = $validEnd . '|' . $hash; + $randHashDB = $validEnd . '|' . md5($hash); // Write hash to DB $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users', 'uid=' . $user['uid'], array('felogin_forgotHash' => $randHashDB)); // Send hashlink to user @@ -479,9 +479,9 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->conf['redirectMode'], 'referer') || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->conf['redirectMode'], 'refererDomains')) { $referer = $this->referer ? $this->referer : \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_REFERER'); if ($referer) { - $extraHiddenAr[] = ('<input type="hidden" name="referer" value="' . htmlspecialchars($referer)) . '" />'; + $extraHiddenAr[] = '<input type="hidden" name="referer" value="' . htmlspecialchars($referer) . '" />'; if ($this->piVars['redirectReferrer'] === 'off') { - $extraHiddenAr[] = ('<input type="hidden" name="' . $this->prefixId) . '[redirectReferrer]" value="off" />'; + $extraHiddenAr[] = '<input type="hidden" name="' . $this->prefixId . '[redirectReferrer]" value="off" />'; } } } @@ -524,7 +524,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $subpartArray['###FORGOTP_VALID###'] = ''; } // The permanent login checkbox should only be shown if permalogin is not deactivated (-1), not forced to be always active (2) and lifetime is greater than 0 - if (($this->conf['showPermaLogin'] && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('0,1', $GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin'])) && $GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'] > 0) { + if ($this->conf['showPermaLogin'] && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('0,1', $GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'] > 0) { $markerArray['###PERMALOGIN###'] = $this->pi_getLL('permalogin', '', 1); if ($GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin'] == 1) { $markerArray['###PERMALOGIN_HIDDENFIELD_ATTRIBUTES###'] = 'disabled="disabled"'; @@ -555,14 +555,14 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin case 'groupLogin': // taken from dkd_redirect_at_login written by Ingmar Schlecht; database-field changed $groupData = $GLOBALS['TSFE']->fe_user->groupData; - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('felogin_redirectPid', $GLOBALS['TSFE']->fe_user->usergroup_table, ('felogin_redirectPid<>\'\' AND uid IN (' . implode(',', $groupData['uid'])) . ')'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('felogin_redirectPid', $GLOBALS['TSFE']->fe_user->usergroup_table, 'felogin_redirectPid<>\'\' AND uid IN (' . implode(',', $groupData['uid']) . ')'); if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) { // take the first group with a redirect page $redirect_url[] = $this->pi_getPageLink($row[0]); } break; case 'userLogin': - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('felogin_redirectPid', $GLOBALS['TSFE']->fe_user->user_table, (($GLOBALS['TSFE']->fe_user->userid_column . '=') . $GLOBALS['TSFE']->fe_user->user['uid']) . ' AND felogin_redirectPid<>\'\''); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('felogin_redirectPid', $GLOBALS['TSFE']->fe_user->user_table, $GLOBALS['TSFE']->fe_user->userid_column . '=' . $GLOBALS['TSFE']->fe_user->user['uid'] . ' AND felogin_redirectPid<>\'\''); if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) { $redirect_url[] = $this->pi_getPageLink($row[0]); } @@ -596,7 +596,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $redirect_domain = $match[1]; $found = FALSE; foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['domains'], TRUE) as $d) { - if (preg_match(('/(^|\\.)/' . $d) . '$', $redirect_domain)) { + if (preg_match('/(^|\\.)/' . $d . '$', $redirect_domain)) { $found = TRUE; break; } @@ -621,14 +621,14 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin } break; } - } elseif (($this->logintype == '' && $redirMethod == 'login') && $this->conf['redirectPageLogin']) { + } elseif ($this->logintype == '' && $redirMethod == 'login' && $this->conf['redirectPageLogin']) { // If login and page not accessible $this->cObj->typolink('', array( 'parameter' => $this->conf['redirectPageLogin'], 'linkAccessRestrictedPages' => TRUE )); $redirect_url[] = $this->cObj->lastTypoLinkUrl; - } elseif ((($this->logintype == '' && $redirMethod == 'logout') && $this->conf['redirectPageLogout']) && $GLOBALS['TSFE']->loginUser) { + } elseif ($this->logintype == '' && $redirMethod == 'logout' && $this->conf['redirectPageLogout'] && $GLOBALS['TSFE']->loginUser) { // If logout and page not accessible $redirect_url[] = $this->pi_getPageLink(intval($this->conf['redirectPageLogout'])); } elseif ($this->logintype === 'logout') { @@ -742,7 +742,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin $additionalParams = ''; if (count($piVars)) { foreach ($piVars as $key => $val) { - $additionalParams .= (('&' . $key) . '=') . $val; + $additionalParams .= '&' . $key . '=' . $val; } } // Should GETvars be preserved? @@ -775,13 +775,13 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin if (stristr($key, $this->prefixId) === FALSE) { if (is_array($val)) { foreach ($val as $key1 => $val1) { - if ($this->conf['preserveGETvars'] == 'all' || in_array((($key . '[') . $key1) . ']', $preserveVars)) { - $params .= (((('&' . $key) . '[') . $key1) . ']=') . $val1; + if ($this->conf['preserveGETvars'] == 'all' || in_array($key . '[' . $key1 . ']', $preserveVars)) { + $params .= '&' . $key . '[' . $key1 . ']=' . $val1; } } } else { if (!in_array($key, array('id', 'no_cache', 'logintype', 'redirect_url', 'cHash'))) { - $params .= (('&' . $key) . '=') . $val; + $params .= '&' . $key . '=' . $val; } } } @@ -803,7 +803,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin if ($char < 10) { $pass .= '' . $char; } else { - $pass .= chr(($char - 10) + 97); + $pass .= chr($char - 10 + 97); } } return $pass; @@ -833,7 +833,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin if ($GLOBALS['TSFE']->fe_user->user) { // All fields of fe_user will be replaced, scheme is ###FEUSER_FIELDNAME### foreach ($GLOBALS['TSFE']->fe_user->user as $field => $value) { - $marker[('###FEUSER_' . \TYPO3\CMS\Core\Utility\GeneralUtility::strtoupper($field)) . '###'] = $this->cObj->stdWrap($value, $this->conf['userfields.'][$field . '.']); + $marker['###FEUSER_' . \TYPO3\CMS\Core\Utility\GeneralUtility::strtoupper($field) . '###'] = $this->cObj->stdWrap($value, $this->conf['userfields.'][$field . '.']); } // Add ###USER### for compatibility $marker['###USER###'] = $marker['###FEUSER_USERNAME###']; @@ -859,7 +859,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin return ''; } // Validate the URL: - if (($this->isRelativeUrl($url) || $this->isInCurrentDomain($url)) || $this->isInLocalDomain($url)) { + if ($this->isRelativeUrl($url) || $this->isInCurrentDomain($url) || $this->isInLocalDomain($url)) { return $url; } // URL is not allowed @@ -898,7 +898,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin foreach ($localDomains as $localDomain) { // strip trailing slashes (if given) $domainName = rtrim($localDomain['domainName'], '/'); - if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr(($host . $path) . '/', $domainName . '/')) { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($host . $path . '/', $domainName . '/')) { $result = TRUE; break; } @@ -918,7 +918,7 @@ class FrontendLoginController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin */ protected function isRelativeUrl($url) { $parsedUrl = @parse_url($url); - if (($parsedUrl !== FALSE && !isset($parsedUrl['scheme'])) && !isset($parsedUrl['host'])) { + if ($parsedUrl !== FALSE && !isset($parsedUrl['scheme']) && !isset($parsedUrl['host'])) { // If the relative URL starts with a slash, we need to check if it's within the current site path return !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($parsedUrl['path'], '/') || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($parsedUrl['path'], \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH')); } diff --git a/typo3/sysext/felogin/Tests/Unit/FrontendLoginTest.php b/typo3/sysext/felogin/Tests/Unit/FrontendLoginTest.php index ad540388f58c99d2b99b395f3bbab3c2ca92f4ba..7fa523c7e279836985576bcdda6ac60e0707185c 100644 --- a/typo3/sysext/felogin/Tests/Unit/FrontendLoginTest.php +++ b/typo3/sysext/felogin/Tests/Unit/FrontendLoginTest.php @@ -46,8 +46,8 @@ class FrontendLoginTest extends \tx_phpunit_testcase { $this->testSitePath = '/'; // We need to subclass because the method we want to test is protected $className = uniqid('FeLogin_'); - eval((' - class ' . $className) . ' extends TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController { + eval(' + class ' . $className . ' extends TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController { public function validateRedirectUrl($url) { return parent::validateRedirectUrl($url); } @@ -113,7 +113,7 @@ class FrontendLoginTest extends \tx_phpunit_testcase { * @test */ public function typo3SiteUrlEqualsStubSiteUrl() { - $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), ('http://' . $this->testHostName) . $this->testSitePath); + $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), 'http://' . $this->testHostName . $this->testSitePath); } /** @@ -133,7 +133,7 @@ class FrontendLoginTest extends \tx_phpunit_testcase { $this->testHostName = 'somenewhostname.com'; $this->testSitePath = '/somenewpath/'; $this->setUpFakeSitePathAndHost(); - $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), ('http://' . $this->testHostName) . $this->testSitePath); + $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), 'http://' . $this->testHostName . $this->testSitePath); } /** diff --git a/typo3/sysext/felogin/ext_localconf.php b/typo3/sysext/felogin/ext_localconf.php index 99bfb44413f6d29751bb8e771e6041e6e6ce46d9..e802af3a26a461009606aac3cefff108469c0b81 100644 --- a/typo3/sysext/felogin/ext_localconf.php +++ b/typo3/sysext/felogin/ext_localconf.php @@ -10,9 +10,9 @@ plugin.tx_felogin_pi1 { userFunc = tx_felogin_pi1->main } '); -\TYPO3\CMS\Core\Extension\ExtensionManager::addTypoScript($_EXTKEY, 'setup', ((' -# Setting ' . $_EXTKEY) . ' plugin TypoScript -') . $pluginContent); +\TYPO3\CMS\Core\Extension\ExtensionManager::addTypoScript($_EXTKEY, 'setup', ' +# Setting ' . $_EXTKEY . ' plugin TypoScript +' . $pluginContent); $addLine = ' tt_content.login = COA tt_content.login { @@ -21,7 +21,7 @@ tt_content.login { 20 = < plugin.tx_felogin_pi1 } '; -\TYPO3\CMS\Core\Extension\ExtensionManager::addTypoScript($_EXTKEY, 'setup', ((('# Setting ' . $_EXTKEY) . ' plugin TypoScript') . $addLine) . '', 43); +\TYPO3\CMS\Core\Extension\ExtensionManager::addTypoScript($_EXTKEY, 'setup', '# Setting ' . $_EXTKEY . ' plugin TypoScript' . $addLine . '', 43); \TYPO3\CMS\Core\Extension\ExtensionManager::addPageTSConfig(' mod.wizards.newContentElement.wizardItems.forms { elements { diff --git a/typo3/sysext/felogin/ext_tables.php b/typo3/sysext/felogin/ext_tables.php index 1e7dafa6819c54932d82852f3b83fa57b8aa7f2e..3bd447dabf87159f3e3782d650bda8ddd55a6d67 100644 --- a/typo3/sysext/felogin/ext_tables.php +++ b/typo3/sysext/felogin/ext_tables.php @@ -5,9 +5,9 @@ if (!defined('TYPO3_MODE')) { $_EXTCONF = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['felogin']); \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content'); if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 4002000) { - \TYPO3\CMS\Core\Extension\ExtensionManager::addPiFlexFormValue('*', ('FILE:EXT:' . $_EXTKEY) . '/flexform.xml', 'login'); + \TYPO3\CMS\Core\Extension\ExtensionManager::addPiFlexFormValue('*', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml', 'login'); } else { - \TYPO3\CMS\Core\Extension\ExtensionManager::addPiFlexFormValue('default', ('FILE:EXT:' . $_EXTKEY) . '/flexform.xml'); + \TYPO3\CMS\Core\Extension\ExtensionManager::addPiFlexFormValue('default', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml'); } \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('tt_content', 'CType', array( 'LLL:EXT:cms/locallang_ttc.xml:CType.I.10', diff --git a/typo3/sysext/filelist/Classes/Controller/FileListController.php b/typo3/sysext/filelist/Classes/Controller/FileListController.php index f9c3dc94e9cd2f88808664b3469065eb9e8d5c36..dd708d82410f987abb477929adb54edc56348bb3 100644 --- a/typo3/sysext/filelist/Classes/Controller/FileListController.php +++ b/typo3/sysext/filelist/Classes/Controller/FileListController.php @@ -168,7 +168,7 @@ class FileListController { if ($this->folderObject) { // Include the initialization for the flash uploader if ($GLOBALS['BE_USER']->uc['enableFlashUploader']) { - $this->doc->JScodeArray['flashUploader'] = (((((((' + $this->doc->JScodeArray['flashUploader'] = ' if (top.TYPO3.FileUploadWindow.isFlashAvailable()) { document.observe("dom:loaded", function() { // monitor the button @@ -178,14 +178,14 @@ class FileListController { // set the page specific options for the flashUploader var flashUploadOptions = { uploadURL: top.TS.PATH_typo3 + "ajax.php", - uploadFileSizeLimit: "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getMaxUploadFileSize()) . '", + uploadFileSizeLimit: "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getMaxUploadFileSize() . '", uploadFileTypes: { - allow: "') . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow']) . '", - deny: "') . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny']) . '" + allow: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow'] . '", + deny: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny'] . '" }, uploadFilePostName: "upload_1", uploadPostParams: { - "file[upload][1][target]": "') . ($this->folderObject ? $this->folderObject->getCombinedIdentifier() : '')) . '", + "file[upload][1][target]": "' . ($this->folderObject ? $this->folderObject->getCombinedIdentifier() : '') . '", "file[upload][1][data]": 1, "file[upload][1][charset]": "utf-8", "ajaxID": "TYPO3\\CMS\\Backend\\Controller\\File\\FileController::process" @@ -300,14 +300,14 @@ class FileListController { // Write the footer $this->filelist->writeBottom(); // Set top JavaScript: - $this->doc->JScode = $this->doc->wrapScriptTags(((' + $this->doc->JScode = $this->doc->wrapScriptTags(' - if (top.fsMod) top.fsMod.recentIds["file"] = unescape("' . rawurlencode($this->id)) . '"); + if (top.fsMod) top.fsMod.recentIds["file"] = unescape("' . rawurlencode($this->id) . '"); function jumpToUrl(URL) { // window.location.href = URL; } - ') . $this->filelist->CBfunctions()); + ' . $this->filelist->CBfunctions()); // This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers. $this->doc->getContextMenuCode(); // Setting up the buttons and markers for docheader @@ -318,7 +318,7 @@ class FileListController { // Build the <body> for the module // Create output $pageContent = ''; - $pageContent .= ('<form action="' . htmlspecialchars($this->filelist->listURL())) . '" method="post" name="dblistForm">'; + $pageContent .= '<form action="' . htmlspecialchars($this->filelist->listURL()) . '" method="post" name="dblistForm">'; $pageContent .= $this->filelist->HTMLcode; $pageContent .= '<input type="hidden" name="cmd" /></form>'; // Making listing options: @@ -332,15 +332,15 @@ class FileListController { '; // Add "display bigControlPanel" checkbox: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') { - $pageContent .= ((\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ') . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE)) . '</label><br />'; + $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />'; } // Add "display thumbnails" checkbox: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') { - $pageContent .= ((\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">') . $GLOBALS['LANG']->getLL('displayThumbs', TRUE)) . '</label><br />'; + $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />'; } // Add "clipboard" checkbox: if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') { - $pageContent .= ((\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">') . $GLOBALS['LANG']->getLL('clipBoard', TRUE)) . '</label>'; + $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>'; } $pageContent .= ' </div> @@ -399,12 +399,12 @@ class FileListController { // FileList Module CSH: $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE); // Upload button (only if upload to this directory is allowed) - if (($this->folderObject && $this->folderObject->getStorage()->checkUserActionPermission('upload', 'File')) && $this->folderObject->checkActionPermission('write')) { - $buttons['upload'] = ((((((((('<a href="' . $GLOBALS['BACK_PATH']) . 'file_upload.php?target=') . rawurlencode($this->folderObject->getCombinedIdentifier())) . '&returnUrl=') . rawurlencode($this->filelist->listURL())) . '" id="button-upload" title="') . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload', 1))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-upload')) . '</a>'; + if ($this->folderObject && $this->folderObject->getStorage()->checkUserActionPermission('upload', 'File') && $this->folderObject->checkActionPermission('write')) { + $buttons['upload'] = '<a href="' . $GLOBALS['BACK_PATH'] . 'file_upload.php?target=' . rawurlencode($this->folderObject->getCombinedIdentifier()) . '&returnUrl=' . rawurlencode($this->filelist->listURL()) . '" id="button-upload" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload', 1)) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-upload') . '</a>'; } // New folder button if ($this->folderObject && $this->folderObject->checkActionPermission('add')) { - $buttons['new'] = ((((((((('<a href="' . $GLOBALS['BACK_PATH']) . 'file_newfolder.php?target=') . rawurlencode($this->folderObject->getCombinedIdentifier())) . '&returnUrl=') . rawurlencode($this->filelist->listURL())) . '" title="') . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new', 1))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-new')) . '</a>'; + $buttons['new'] = '<a href="' . $GLOBALS['BACK_PATH'] . 'file_newfolder.php?target=' . rawurlencode($this->folderObject->getCombinedIdentifier()) . '&returnUrl=' . rawurlencode($this->filelist->listURL()) . '" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new', 1)) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-new') . '</a>'; } return $buttons; } diff --git a/typo3/sysext/filelist/Classes/FileList.php b/typo3/sysext/filelist/Classes/FileList.php index f4e0cbad5ea13c7b5c189931dc28b370dc22a66e..8d809f8cf2c59335f11ed8e99d15eee6cef1ac7d 100644 --- a/typo3/sysext/filelist/Classes/FileList.php +++ b/typo3/sysext/filelist/Classes/FileList.php @@ -231,7 +231,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'], $folderObject->getCombinedIdentifier()); } } - $buttons['refresh'] = ((((('<a href="' . htmlspecialchars($this->listURL())) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', 1)) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh')) . '</a>'; + $buttons['refresh'] = '<a href="' . htmlspecialchars($this->listURL()) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', 1) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh') . '</a>'; return array($buttons, $otherMarkers); } @@ -246,11 +246,11 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { * @todo Define visibility */ public function linkClipboardHeaderIcon($string, $table, $cmd, $warning = '') { - $onClickEvent = ('document.dblistForm.cmd.value=\'' . $cmd) . '\';document.dblistForm.submit();'; + $onClickEvent = 'document.dblistForm.cmd.value=\'' . $cmd . '\';document.dblistForm.submit();'; if ($warning) { - $onClickEvent = ((('if (confirm(' . $GLOBALS['LANG']->JScharCode($warning)) . ')){') . $onClickEvent) . '}'; + $onClickEvent = 'if (confirm(' . $GLOBALS['LANG']->JScharCode($warning) . ')){' . $onClickEvent . '}'; } - return ((('<a href="#" onclick="' . htmlspecialchars($onClickEvent)) . 'return false;">') . $string) . '</a>'; + return '<a href="#" onclick="' . htmlspecialchars($onClickEvent) . 'return false;">' . $string . '</a>'; } /** @@ -316,7 +316,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { // Cleaning rowlist for duplicates and place the $titleCol as the first column always! $rowlist = \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList($titleCol, $rowlist); $rowlist = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($rowlist); - $rowlist = $rowlist ? ($titleCol . ',') . $rowlist : $titleCol; + $rowlist = $rowlist ? $titleCol . ',' . $rowlist : $titleCol; if ($this->bigControlPanel || $this->clipBoard) { $rowlist = str_replace('file,', 'file,_CLIPBOARD_,', $rowlist); } @@ -343,13 +343,13 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $table = '_FILE'; $elFromTable = $this->clipObj->elFromTable($table); if (count($elFromTable)) { - $cells[] = ((((((('<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $this->folderObject->getCombinedIdentifier()))) . '" onclick="return ') . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $this->path, 'into', $elFromTable))) . '" title="') . $GLOBALS['LANG']->getLL('clip_paste', 1)) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-after')) . '</a>'; + $cells[] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $this->folderObject->getCombinedIdentifier())) . '" onclick="return ' . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $this->path, 'into', $elFromTable)) . '" title="' . $GLOBALS['LANG']->getLL('clip_paste', 1) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-after') . '</a>'; } if ($this->clipObj->current != 'normal' && $iOut) { $cells[] = $this->linkClipboardHeaderIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-copy', array('title' => $GLOBALS['LANG']->getLL('clip_selectMarked', 1))), $table, 'setCB'); $cells[] = $this->linkClipboardHeaderIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete', array('title' => $GLOBALS['LANG']->getLL('clip_deleteMarked'))), $table, 'delete', $GLOBALS['LANG']->getLL('clip_deleteMarkedWarning')); - $onClick = ('checkOffCB(\'' . implode(',', $this->CBnames)) . '\', this); return false;'; - $cells[] = ((((('<a class="cbcCheckAll" rel="" href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . $GLOBALS['LANG']->getLL('clip_markRecords', TRUE)) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-select')) . '</a>'; + $onClick = 'checkOffCB(\'' . implode(',', $this->CBnames) . '\', this); return false;'; + $cells[] = '<a class="cbcCheckAll" rel="" href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $GLOBALS['LANG']->getLL('clip_markRecords', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-select') . '</a>'; } $theData[$v] = implode('', $cells); } else { @@ -358,18 +358,18 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $theData[$v] = $theT; } } - $out .= ('<thead>' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '')) . '</thead>'; - $out .= ('<tbody>' . $iOut) . '</tbody>'; + $out .= '<thead>' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '') . '</thead>'; + $out .= '<tbody>' . $iOut . '</tbody>'; // half line is drawn // finish - $out = (' + $out = ' <!-- File list table: --> <table cellpadding="0" cellspacing="0" id="typo3-filelist"> - ' . $out) . ' + ' . $out . ' </table>'; } else { /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */ @@ -391,7 +391,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { } else { $fileLabel = $GLOBALS['LANG']->getLL('files', TRUE); } - return ((($this->counter . ' ') . $fileLabel) . ', ') . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($this->totalbytes, $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE)); + return $this->counter . ' ' . $fileLabel . ', ' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($this->totalbytes, $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE)); } /** @@ -421,10 +421,10 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { switch ($field) { case 'size': $numFiles = $folderObject->getFileCount(); - $theData[$field] = ($numFiles . ' ') . $GLOBALS['LANG']->getLL(($numFiles === 1 ? 'file' : 'files'), TRUE); + $theData[$field] = $numFiles . ' ' . $GLOBALS['LANG']->getLL(($numFiles === 1 ? 'file' : 'files'), TRUE); break; case 'rw': - $theData[$field] = (!$folderObject->checkActionPermission('read') ? ' ' : ('<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE)) . '</strong></span>') . (!$folderObject->checkActionPermission('write') ? '' : ('<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE)) . '</strong></span>'); + $theData[$field] = (!$folderObject->checkActionPermission('read') ? ' ' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE) . '</strong></span>') . (!$folderObject->checkActionPermission('write') ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE) . '</strong></span>'); break; case 'fileext': $theData[$field] = $GLOBALS['LANG']->getLL('folder', TRUE); @@ -469,13 +469,13 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { * @todo Define visibility */ public function linkWrapDir($title, \TYPO3\CMS\Core\Resource\Folder $folderObject) { - $href = (($this->backPath . $this->script) . '&id=') . rawurlencode($folderObject->getCombinedIdentifier()); - $onclick = (' onclick="' . htmlspecialchars((('top.content.nav_frame.hilight_row("file","folder' . \TYPO3\CMS\Core\Utility\GeneralUtility::md5int($folderObject->getCombinedIdentifier())) . '_"+top.fsMod.currentBank)'))) . '"'; + $href = $this->backPath . $this->script . '&id=' . rawurlencode($folderObject->getCombinedIdentifier()); + $onclick = ' onclick="' . htmlspecialchars(('top.content.nav_frame.hilight_row("file","folder' . \TYPO3\CMS\Core\Utility\GeneralUtility::md5int($folderObject->getCombinedIdentifier()) . '_"+top.fsMod.currentBank)')) . '"'; // Sometimes $code contains plain HTML tags. In such a case the string should not be modified! if (!strcmp($title, strip_tags($title))) { - return ((((((('<a href="' . htmlspecialchars($href)) . '"') . $onclick) . ' title="') . htmlspecialchars($title)) . '">') . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($title, $this->fixedL)) . '</a>'; + return '<a href="' . htmlspecialchars($href) . '"' . $onclick . ' title="' . htmlspecialchars($title) . '">' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($title, $this->fixedL) . '</a>'; } else { - return ((((('<a href="' . htmlspecialchars($href)) . '"') . $onclick) . '>') . $title) . '</a>'; + return '<a href="' . htmlspecialchars($href) . '"' . $onclick . '>' . $title . '</a>'; } } @@ -490,8 +490,8 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { public function linkWrapFile($code, \TYPO3\CMS\Core\Resource\File $fileObject) { $fileUrl = $fileObject->getPublicUrl(TRUE); if ($fileUrl) { - $aOnClick = ('return top.openUrlInWindow(\'' . $fileUrl) . '\', \'WebFile\');'; - $code = ((((('<a href="#" title="' . htmlspecialchars($code)) . '" onclick="') . htmlspecialchars($aOnClick)) . '">') . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($code, $this->fixedL)) . '</a>'; + $aOnClick = 'return top.openUrlInWindow(\'' . $fileUrl . '\', \'WebFile\');'; + $code = '<a href="#" title="' . htmlspecialchars($code) . '" onclick="' . htmlspecialchars($aOnClick) . '">' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($code, $this->fixedL) . '</a>'; } return $code; } @@ -523,11 +523,11 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $icon = 'apps-filetree-folder-default'; if ($title == '_temp_') { $icon = 'apps-filetree-folder-temp'; - $title = ('<strong>' . $GLOBALS['LANG']->getLL('temp', TRUE)) . '</strong>'; + $title = '<strong>' . $GLOBALS['LANG']->getLL('temp', TRUE) . '</strong>'; } if ($title == '_recycler_') { $icon = 'apps-filetree-folder-recycler'; - $title = ('<strong>' . $GLOBALS['LANG']->getLL('recycler', TRUE)) . '</strong>'; + $title = '<strong>' . $GLOBALS['LANG']->getLL('recycler', TRUE) . '</strong>'; } // Mark the icon as read-only icon if the folder is not writable if ($folderObject->checkActionPermission('write') === FALSE) { @@ -568,7 +568,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $theData[$field] = \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileObject->getSize(), $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE)); break; case 'rw': - $theData[$field] = ('' . (!$fileObject->checkActionPermission('read') ? ' ' : ('<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE)) . '</strong></span>')) . (!$fileObject->checkActionPermission('write') ? '' : ('<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE)) . '</strong></span>'); + $theData[$field] = '' . (!$fileObject->checkActionPermission('read') ? ' ' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('read', TRUE) . '</strong></span>') . (!$fileObject->checkActionPermission('write') ? '' : '<span class="typo3-red"><strong>' . $GLOBALS['LANG']->getLL('write', TRUE) . '</strong></span>'); break; case 'fileext': $theData[$field] = strtoupper($ext); @@ -594,7 +594,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $processedFile = $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array()); if ($processedFile) { $thumbUrl = $processedFile->getPublicUrl(TRUE); - $theData[$field] .= ((('<br /><img src="' . $thumbUrl) . '" hspace="2" title="') . htmlspecialchars($fileName)) . '" alt="" />'; + $theData[$field] .= '<br /><img src="' . $thumbUrl . '" hspace="2" title="' . htmlspecialchars($fileName) . '" alt="" />'; } } break; @@ -634,14 +634,14 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { public function linkWrapSort($code, $folderIdentifier, $col) { if ($this->sort === $col) { // Check reverse sorting - $params = (('&SET[sort]=' . $col) . '&SET[reverse]=') . ($this->sortRev ? '0' : '1'); + $params = '&SET[sort]=' . $col . '&SET[reverse]=' . ($this->sortRev ? '0' : '1'); $sortArrow = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-sorting-light-' . ($this->sortRev ? 'desc' : 'asc')); } else { - $params = ('&SET[sort]=' . $col) . '&SET[reverse]=0'; + $params = '&SET[sort]=' . $col . '&SET[reverse]=0'; $sortArrow = ''; } - $href = ((\TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(($GLOBALS['BACK_PATH'] . $this->script)) . '&id=') . rawurlencode($folderIdentifier)) . $params; - return (((('<a href="' . htmlspecialchars($href)) . '">') . $code) . $sortArrow) . '</a>'; + $href = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(($GLOBALS['BACK_PATH'] . $this->script)) . '&id=' . rawurlencode($folderIdentifier) . $params; + return '<a href="' . htmlspecialchars($href) . '">' . $code . $sortArrow . '</a>'; } /** @@ -658,25 +658,25 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { // For normal clipboard, add copy/cut buttons: if ($this->clipObj->current == 'normal') { $isSel = $this->clipObj->isSelected('_FILE', $md5); - $cells[] = ((('<a href="' . htmlspecialchars($this->clipObj->selUrlFile($fullIdentifier, 1, ($isSel == 'copy')))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-copy' . ($isSel == 'copy' ? '-release' : '')), array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.copy', 1)))) . '</a>'; - $cells[] = ((('<a href="' . htmlspecialchars($this->clipObj->selUrlFile($fullIdentifier, 0, ($isSel == 'cut')))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-cut' . ($isSel == 'cut' ? '-release' : '')), array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.cut', 1)))) . '</a>'; + $cells[] = '<a href="' . htmlspecialchars($this->clipObj->selUrlFile($fullIdentifier, 1, ($isSel == 'copy'))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-copy' . ($isSel == 'copy' ? '-release' : '')), array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.copy', 1))) . '</a>'; + $cells[] = '<a href="' . htmlspecialchars($this->clipObj->selUrlFile($fullIdentifier, 0, ($isSel == 'cut'))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-cut' . ($isSel == 'cut' ? '-release' : '')), array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.cut', 1))) . '</a>'; } else { // For numeric pads, add select checkboxes: $n = '_FILE|' . $md5; $this->CBnames[] = $n; $checked = $this->clipObj->isSelected('_FILE', $md5) ? ' checked="checked"' : ''; - $cells[] = (((((((('<input type="hidden" name="CBH[' . $n) . ']" value="0" />') . '<input type="checkbox" name="CBC[') . $n) . ']" value="') . htmlspecialchars($fullIdentifier)) . '" class="smallCheckboxes"') . $checked) . ' />'; + $cells[] = '<input type="hidden" name="CBH[' . $n . ']" value="0" />' . '<input type="checkbox" name="CBC[' . $n . ']" value="' . htmlspecialchars($fullIdentifier) . '" class="smallCheckboxes"' . $checked . ' />'; } // Display PASTE button, if directory: $elFromTable = $this->clipObj->elFromTable('_FILE'); if (is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\Folder') && count($elFromTable)) { - $cells[] = ((((((('<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $fullIdentifier))) . '" onclick="return ') . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $fullIdentifier, 'into', $elFromTable))) . '" title="') . $GLOBALS['LANG']->getLL('clip_pasteInto', TRUE)) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-into')) . '</a>'; + $cells[] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $fullIdentifier)) . '" onclick="return ' . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $fullIdentifier, 'into', $elFromTable)) . '" title="' . $GLOBALS['LANG']->getLL('clip_pasteInto', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-into') . '</a>'; } // Compile items into a DIV-element: - return (' <!-- CLIPBOARD PANEL: --> + return ' <!-- CLIPBOARD PANEL: --> <div class="typo3-clipCtrl"> ' . implode(' - ', $cells)) . ' + ', $cells) . ' </div>'; } @@ -692,12 +692,12 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier(); // Edit metadata of file try { - if ((is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\File') && $fileOrFolderObject->isIndexed()) && $fileOrFolderObject->checkActionPermission('edit')) { + if (is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\File') && $fileOrFolderObject->isIndexed() && $fileOrFolderObject->checkActionPermission('edit')) { $data = array( 'sys_file' => array($fileOrFolderObject->getUid() => 'edit') ); $editOnClick = \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick(\TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('edit', $data), $GLOBALS['BACK_PATH'], $this->listUrl()); - $cells['editmetadata'] = ((('<a href="#" onclick="' . $editOnClick) . '" title="Edit Metadata of this file">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open')) . '</a>'; + $cells['editmetadata'] = '<a href="#" onclick="' . $editOnClick . '" title="Edit Metadata of this file">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>'; } else { $cells['editmetadata'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty'); } @@ -705,25 +705,25 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { $cells['editmetadata'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty'); } // Edit file content (if editable) - if ((is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\File') && $fileOrFolderObject->checkActionPermission('edit')) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], $fileOrFolderObject->getExtension())) { - $editOnClick = ('top.content.list_frame.location.href=top.TS.PATH_typo3+\'file_edit.php?target=' . rawurlencode($fullIdentifier)) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; - $cells['edit'] = ((((('<a href="#" onclick="' . $editOnClick) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.edit')) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-page-open')) . '</a>'; + if (is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\File') && $fileOrFolderObject->checkActionPermission('edit') && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], $fileOrFolderObject->getExtension())) { + $editOnClick = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'file_edit.php?target=' . rawurlencode($fullIdentifier) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; + $cells['edit'] = '<a href="#" onclick="' . $editOnClick . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.edit') . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-page-open') . '</a>'; } else { $cells['edit'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty'); } // rename the file if ($fileOrFolderObject->checkActionPermission('rename')) { - $renameOnClick = ('top.content.list_frame.location.href = top.TS.PATH_typo3+\'file_rename.php?target=' . rawurlencode($fullIdentifier)) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; - $cells['rename'] = ((((('<a href="#" onclick="' . $renameOnClick) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.rename')) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-rename')) . '</a>'; + $renameOnClick = 'top.content.list_frame.location.href = top.TS.PATH_typo3+\'file_rename.php?target=' . rawurlencode($fullIdentifier) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; + $cells['rename'] = '<a href="#" onclick="' . $renameOnClick . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.rename') . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-rename') . '</a>'; } else { $cells['rename'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty'); } if (is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\Folder')) { - $infoOnClick = ('top.launchView( \'_FOLDER\', \'' . $fullIdentifier) . '\');return false;'; + $infoOnClick = 'top.launchView( \'_FOLDER\', \'' . $fullIdentifier . '\');return false;'; } elseif (is_a($fileOrFolderObject, 'TYPO3\\CMS\\Core\\Resource\\File')) { - $infoOnClick = ('top.launchView( \'_FILE\', \'' . $fullIdentifier) . '\');return false;'; + $infoOnClick = 'top.launchView( \'_FILE\', \'' . $fullIdentifier . '\');return false;'; } - $cells['info'] = ((((('<a href="#" onclick="' . $infoOnClick) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.info')) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-dialog-information')) . '</a>'; + $cells['info'] = '<a href="#" onclick="' . $infoOnClick . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.info') . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-dialog-information') . '</a>'; // Hook for manipulating edit icons. if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'])) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] as $classData) { @@ -735,10 +735,10 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { } } // Compile items into a DIV-element: - return (' <!-- EDIT CONTROLS: --> + return ' <!-- EDIT CONTROLS: --> <div class="typo3-editCtrl"> ' . implode(' - ', $cells)) . ' + ', $cells) . ' </div>'; } @@ -754,8 +754,8 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList { return '-'; } // Look up the path: - $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', ((('ref_table = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('sys_file', 'sys_refindex')) . ' AND ref_uid = ') . $fileOrFolderObject->getUid()) . ' AND deleted=0'); - return $this->generateReferenceToolTip($rows, ('\'_FILE\', \'' . $fileOrFolderObject->getCombinedIdentifier()) . '\''); + $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'ref_table = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('sys_file', 'sys_refindex') . ' AND ref_uid = ' . $fileOrFolderObject->getUid() . ' AND deleted=0'); + return $this->generateReferenceToolTip($rows, '\'_FILE\', \'' . $fileOrFolderObject->getCombinedIdentifier() . '\''); } } diff --git a/typo3/sysext/filelist/Classes/FileListFolderTree.php b/typo3/sysext/filelist/Classes/FileListFolderTree.php index 2405f1127a038fe6082ddf02e37f4c7ea0c7b478..3851614b87bb01ec33c3f558bcb431ddb9c2448c 100644 --- a/typo3/sysext/filelist/Classes/FileListFolderTree.php +++ b/typo3/sysext/filelist/Classes/FileListFolderTree.php @@ -53,7 +53,7 @@ class FileListFolderTree extends \TYPO3\CMS\Backend\Tree\View\FolderTreeView { public function wrapIcon($theFolderIcon, \TYPO3\CMS\Core\Resource\Folder $folderObject) { $theFolderIcon = parent::wrapIcon($theFolderIcon, $folderObject); // Wrap icon in a drag/drop span. - return ((('<span class="dragIcon" id="dragIconID_' . $this->getJumpToParam($folderObject)) . '">') . $theFolderIcon) . '</span>'; + return '<span class="dragIcon" id="dragIconID_' . $this->getJumpToParam($folderObject) . '">' . $theFolderIcon . '</span>'; } /** @@ -69,7 +69,7 @@ class FileListFolderTree extends \TYPO3\CMS\Backend\Tree\View\FolderTreeView { public function wrapTitle($title, \TYPO3\CMS\Core\Resource\Folder $folderObject, $bank = 0) { $theFolderTitle = parent::wrapTitle($title, $folderObject, $bank); // Wrap title in a drag/drop span. - return ((('<span class="dragTitle" id="dragTitleID_' . $this->getJumpToParam($folderObject)) . '">') . $theFolderTitle) . '</span>'; + return '<span class="dragTitle" id="dragTitleID_' . $this->getJumpToParam($folderObject) . '">' . $theFolderTitle . '</span>'; } } diff --git a/typo3/sysext/form/Classes/Controller/FormController.php b/typo3/sysext/form/Classes/Controller/FormController.php index 435f1d89c835f8e9509e955d39804ae7ee1c54a9..409d28515f360b47c72479be9e265799e6646a9e 100644 --- a/typo3/sysext/form/Classes/Controller/FormController.php +++ b/typo3/sysext/form/Classes/Controller/FormController.php @@ -150,7 +150,7 @@ class FormController { protected function showForm() { $show = FALSE; $submittedByPrefix = $this->requestHandler->getByMethod(); - if (($submittedByPrefix === NULL || !empty($submittedByPrefix) && !$this->validate->isValid()) || (!empty($submittedByPrefix) && $this->validate->isValid()) && $this->requestHandler->getPost('confirmation-false', NULL) !== NULL) { + if ($submittedByPrefix === NULL || !empty($submittedByPrefix) && !$this->validate->isValid() || !empty($submittedByPrefix) && $this->validate->isValid() && $this->requestHandler->getPost('confirmation-false', NULL) !== NULL) { $show = TRUE; } return $show; @@ -181,7 +181,7 @@ class FormController { */ protected function showConfirmation() { $show = FALSE; - if ((isset($this->typoscript['confirmation']) && $this->typoscript['confirmation'] == 1) && $this->requestHandler->getPost('confirmation-true', NULL) === NULL) { + if (isset($this->typoscript['confirmation']) && $this->typoscript['confirmation'] == 1 && $this->requestHandler->getPost('confirmation-true', NULL) === NULL) { $show = TRUE; } return $show; diff --git a/typo3/sysext/form/Classes/Domain/Factory/JsonToTyposcript.php b/typo3/sysext/form/Classes/Domain/Factory/JsonToTyposcript.php index 8723dbb1aeb9e7ca2e4210ae3b0a4923e4859676..96dfb60dfd83bea505972140b2b0b9fd2998df67 100644 --- a/typo3/sysext/form/Classes/Domain/Factory/JsonToTyposcript.php +++ b/typo3/sysext/form/Classes/Domain/Factory/JsonToTyposcript.php @@ -70,7 +70,7 @@ class JsonToTypoScript { $typoscriptArray = array(); $typoscript = NULL; $this->convertToTyposcriptArray($elements, $typoscriptArray); - if (($typoscriptArray['10.'] && is_array($typoscriptArray['10.'])) && !empty($typoscriptArray['10.'])) { + if ($typoscriptArray['10.'] && is_array($typoscriptArray['10.']) && !empty($typoscriptArray['10.'])) { $typoscript = $this->typoscriptArrayToString($typoscriptArray['10.']); } return $typoscript; @@ -308,7 +308,7 @@ class JsonToTypoScript { */ protected function setAttributes(array $attributes, array &$parent, $elementCounter, $childrenWithParentName = FALSE) { foreach ($attributes as $key => $value) { - if (($key === 'name' && $value === '') && !$childrenWithParentName) { + if ($key === 'name' && $value === '' && !$childrenWithParentName) { $value = $this->elementId; } if ($value != '' && $key != 'type') { @@ -392,24 +392,24 @@ class JsonToTypoScript { case 'typo3-form-wizard-elements-basic-textline': if ($value === 'back') { - $parent[$elementCounter . '.']['layout'] = ('<input />' . chr(10)) . '<label />'; + $parent[$elementCounter . '.']['layout'] = '<input />' . chr(10) . '<label />'; } break; case 'typo3-form-wizard-elements-basic-checkbox': case 'typo3-form-wizard-elements-basic-radio': if ($value === 'front') { - $parent[$elementCounter . '.']['layout'] = ('<label />' . chr(10)) . '<input />'; + $parent[$elementCounter . '.']['layout'] = '<label />' . chr(10) . '<input />'; } break; case 'typo3-form-wizard-elements-basic-select': if ($value === 'back') { - $parent[$elementCounter . '.']['layout'] = ((((('<select>' . chr(10)) . '<elements />') . chr(10)) . '</select>') . chr(10)) . '<label />'; + $parent[$elementCounter . '.']['layout'] = '<select>' . chr(10) . '<elements />' . chr(10) . '</select>' . chr(10) . '<label />'; } break; case 'typo3-form-wizard-elements-basic-textarea': if ($value === 'back') { - $parent[$elementCounter . '.']['layout'] = ('<textarea />' . chr(10)) . '<label />'; + $parent[$elementCounter . '.']['layout'] = '<textarea />' . chr(10) . '<label />'; } break; default: @@ -553,18 +553,18 @@ class JsonToTypoScript { protected function typoscriptArrayToString(array $typoscriptArray, $addKey = '', $tabCount = -1) { $typoscript = ''; if ($addKey != '') { - $typoscript .= ((str_repeat(chr(9), $tabCount) . str_replace('.', '', $addKey)) . ' {') . chr(10); + $typoscript .= str_repeat(chr(9), $tabCount) . str_replace('.', '', $addKey) . ' {' . chr(10); } $tabCount++; foreach ($typoscriptArray as $key => $value) { if (!is_array($value)) { if (strstr($value, chr(10))) { - $typoscript .= ((str_repeat(chr(9), $tabCount) . $key) . ' (') . chr(10); + $typoscript .= str_repeat(chr(9), $tabCount) . $key . ' (' . chr(10); $value = str_replace(chr(10), chr(10) . str_repeat(chr(9), ($tabCount + 1)), $value); - $typoscript .= (str_repeat(chr(9), ($tabCount + 1)) . $value) . chr(10); - $typoscript .= (str_repeat(chr(9), $tabCount) . ')') . chr(10); + $typoscript .= str_repeat(chr(9), ($tabCount + 1)) . $value . chr(10); + $typoscript .= str_repeat(chr(9), $tabCount) . ')' . chr(10); } else { - $typoscript .= (((str_repeat(chr(9), $tabCount) . $key) . ' = ') . $value) . chr(10); + $typoscript .= str_repeat(chr(9), $tabCount) . $key . ' = ' . $value . chr(10); } } else { $typoscript .= $this->typoscriptArrayToString($value, $key, $tabCount); @@ -572,7 +572,7 @@ class JsonToTypoScript { } if ($addKey != '') { $tabCount--; - $typoscript .= (str_repeat(chr(9), $tabCount) . '}') . chr(10); + $typoscript .= str_repeat(chr(9), $tabCount) . '}' . chr(10); } return $typoscript; } diff --git a/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php b/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php index 61716929136d9f8f49d33b03e8ca4fd3022bdc88..fae7ebfa2d10572440677fd0fd30306556f2a179 100644 --- a/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php +++ b/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php @@ -95,7 +95,7 @@ class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface { } } } else { - throw new \InvalidArgumentException(('Container element with id=' . $parentElement->getElementId()) . ' has no configuration which means no children.', 1333754854); + throw new \InvalidArgumentException('Container element with id=' . $parentElement->getElementId() . ' has no configuration which means no children.', 1333754854); } } @@ -177,7 +177,7 @@ class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface { $object->setData($arguments['data']); $this->reconstituteElement($object, $arguments); } else { - throw new \InvalidArgumentException(('Element type "' . $object->getElementType()) . '" is not supported.', 1333754878); + throw new \InvalidArgumentException('Element type "' . $object->getElementType() . '" is not supported.', 1333754878); } return $object; } @@ -216,7 +216,7 @@ class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface { $attributes = $element->getAllowedAttributes(); $mandatoryAttributes = $element->getMandatoryAttributes(); foreach ($attributes as $attribute => $value) { - if (((isset($arguments[$attribute]) || isset($arguments[$attribute . '.'])) || in_array($attribute, $mandatoryAttributes)) || !empty($value)) { + if (isset($arguments[$attribute]) || isset($arguments[$attribute . '.']) || in_array($attribute, $mandatoryAttributes) || !empty($value)) { if (!empty($arguments[$attribute])) { $value = $arguments[$attribute]; } elseif (!empty($arguments[($attribute . '.')])) { @@ -230,7 +230,7 @@ class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface { } } } else { - throw new \InvalidArgumentException(('The element with id=' . $element->getElementId()) . ' has no default attributes set.', 1333754925); + throw new \InvalidArgumentException('The element with id=' . $element->getElementId() . ' has no default attributes set.', 1333754925); } } @@ -269,7 +269,7 @@ class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface { } } } else { - throw new \InvalidArgumentException(('The element with id=' . $element->getElementId()) . ' has no additionals set.', 1333754962); + throw new \InvalidArgumentException('The element with id=' . $element->getElementId() . ' has no additionals set.', 1333754962); } } } diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php index e8b865c962b439aab74f5e834bee431903dd2530..9f155d3d060d56bc94e2eeaba8e1b106bc7018f4 100644 --- a/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php +++ b/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php @@ -81,7 +81,7 @@ class NameAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttri $value = $this->getValueWithoutPrefix(); if ($this->returnValueWithoutPrefix === FALSE) { $requestHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Request'); - $attribute = ((($requestHandler->getPrefix() . '[') . $value) . ']') . $this->addition; + $attribute = $requestHandler->getPrefix() . '[' . $value . ']' . $this->addition; } else { $attribute = $value; } diff --git a/typo3/sysext/form/Classes/Domain/Model/Element/HeaderElement.php b/typo3/sysext/form/Classes/Domain/Model/Element/HeaderElement.php index 610db1f873b070d1341655b7fad4d88e0ce32d07..84269e22a5e59d8240e42fc9279f4ed1647a97fc 100644 --- a/typo3/sysext/form/Classes/Domain/Model/Element/HeaderElement.php +++ b/typo3/sysext/form/Classes/Domain/Model/Element/HeaderElement.php @@ -49,7 +49,7 @@ class HeaderElement extends \TYPO3\CMS\Form\Domain\Model\Element\AbstractPlainEl */ protected function wrapContent($content) { if (isset($this->properties['headingSize']) && preg_match('#^h[1-5]$#', $this->properties['headingSize'])) { - $content = ((((('<' . $this->properties['headingSize']) . '>') . $content) . '</') . $this->properties['headingSize']) . '>'; + $content = '<' . $this->properties['headingSize'] . '>' . $content . '</' . $this->properties['headingSize'] . '>'; } return $content; } diff --git a/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php b/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php index 24b8b27f8cd20b7e3bc57183c6d9cb349cc83f50..90f06de6186306598d51b82f44043369c8e500e7 100644 --- a/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php +++ b/typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php @@ -83,7 +83,7 @@ class SelectElement extends \TYPO3\CMS\Form\Domain\Model\Element\ContainerElemen if (array_key_exists($attribute, $this->allowedAttributes)) { $this->attributes->addAttribute($attribute, $value); } - if (($attribute === 'name' && $this->attributes->hasAttribute('multiple')) && $this->attributes->getValue('multiple') === 'multiple' || $attribute === 'multiple' && $this->attributes->hasAttribute('name')) { + if ($attribute === 'name' && $this->attributes->hasAttribute('multiple') && $this->attributes->getValue('multiple') === 'multiple' || $attribute === 'multiple' && $this->attributes->hasAttribute('name')) { /** @var $nameAttribute \TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute */ $nameAttribute = $this->attributes->getAttributeObjectByKey('name'); $nameAttribute->setAddition('[]'); diff --git a/typo3/sysext/form/Classes/Filter/AlphabeticFilter.php b/typo3/sysext/form/Classes/Filter/AlphabeticFilter.php index 1cdaca9e03147934b973e4498ff089fb68938a39..6723beacba07a88762ef7543515aedc143e6cbdf 100644 --- a/typo3/sysext/form/Classes/Filter/AlphabeticFilter.php +++ b/typo3/sysext/form/Classes/Filter/AlphabeticFilter.php @@ -68,7 +68,7 @@ class AlphabeticFilter implements \TYPO3\CMS\Form\Filter\FilterInterface { */ public function filter($value) { $whiteSpace = $this->allowWhiteSpace ? '\\s' : ''; - $pattern = ('/[^[:alpha:]' . $whiteSpace) . ']/u'; + $pattern = '/[^[:alpha:]' . $whiteSpace . ']/u'; return preg_replace($pattern, '', (string) $value); } diff --git a/typo3/sysext/form/Classes/Filter/AlphanumericFilter.php b/typo3/sysext/form/Classes/Filter/AlphanumericFilter.php index 7edf09cca028a7427648d5ec0970174986e0ba2a..ad9d81b255fb2e06eef0d4317b27f53a0811d432 100644 --- a/typo3/sysext/form/Classes/Filter/AlphanumericFilter.php +++ b/typo3/sysext/form/Classes/Filter/AlphanumericFilter.php @@ -68,7 +68,7 @@ class AlphanumericFilter implements \TYPO3\CMS\Form\Filter\FilterInterface { */ public function filter($value) { $whiteSpace = $this->allowWhiteSpace ? '\\s' : ''; - $pattern = ('/[^[:alnum:]' . $whiteSpace) . ']/u'; + $pattern = '/[^[:alnum:]' . $whiteSpace . ']/u'; return preg_replace($pattern, '', (string) $value); } diff --git a/typo3/sysext/form/Classes/Localization.php b/typo3/sysext/form/Classes/Localization.php index 17d01eca54835387358ea19e995a4591143731b8..d3087751734724be810b216f105b7b072eb3d194 100644 --- a/typo3/sysext/form/Classes/Localization.php +++ b/typo3/sysext/form/Classes/Localization.php @@ -56,9 +56,9 @@ class Localization implements \TYPO3\CMS\Core\SingletonInterface { */ public function getLocalLanguageLabel($labelKey) { if (TYPO3_MODE === 'FE') { - $output = $GLOBALS['TSFE']->sL(($this->localLanguageFile . ':') . $labelKey); + $output = $GLOBALS['TSFE']->sL($this->localLanguageFile . ':' . $labelKey); } else { - $output = $GLOBALS['LANG']->sL(($this->localLanguageFile . ':') . $labelKey); + $output = $GLOBALS['LANG']->sL($this->localLanguageFile . ':' . $labelKey); } return $output; } diff --git a/typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php b/typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php index 5edf988f4d6fa3470d10a2799b85885983a8f428..cd75aa3d06348b7b32efdd0b4cf7763f6e1ba903 100644 --- a/typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php +++ b/typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php @@ -140,7 +140,7 @@ class MailPostProcessor implements \TYPO3\CMS\Form\PostProcess\PostProcessorInte } $fromName = $this->sanitizeHeaderString($fromName); if (preg_match('/\\s|,/', $fromName) >= 1) { - $fromName = ('"' . $fromName) . '"'; + $fromName = '"' . $fromName . '"'; } $from = array($fromEmail => $fromName); $this->mailMessage->setFrom($from); diff --git a/typo3/sysext/form/Classes/Validation/AbstractValidator.php b/typo3/sysext/form/Classes/Validation/AbstractValidator.php index 399383223b00e52c476ac5eac3772b3ab732ca7a..a874725c33772f1aa9dc9f7b175b0242deb759ce 100644 --- a/typo3/sysext/form/Classes/Validation/AbstractValidator.php +++ b/typo3/sysext/form/Classes/Validation/AbstractValidator.php @@ -249,7 +249,7 @@ abstract class AbstractValidator implements \TYPO3\CMS\Form\Validation\Interface * @return string The local language message label */ protected function getLocalLanguageLabel($type) { - $label = (strtolower(get_class($this)) . '.') . $type; + $label = strtolower(get_class($this)) . '.' . $type; $message = $this->localizationHandler->getLocalLanguageLabel($label); return $message; } diff --git a/typo3/sysext/form/Classes/Validation/BetweenValidator.php b/typo3/sysext/form/Classes/Validation/BetweenValidator.php index 61ae4a3952715de5ffc9348bb7f5e64660b2dbef..9bca5761f9445cc22ae8c54191aa8a7b4d85a91a 100644 --- a/typo3/sysext/form/Classes/Validation/BetweenValidator.php +++ b/typo3/sysext/form/Classes/Validation/BetweenValidator.php @@ -133,7 +133,7 @@ class BetweenValidator extends \TYPO3\CMS\Form\Validation\AbstractValidator impl * @see tx_form_System_Validate_Abstract::_getLocalLanguageLabel() */ protected function getLocalLanguageLabel($type) { - $label = (strtolower(get_class($this)) . '.') . $type; + $label = strtolower(get_class($this)) . '.' . $type; $messages[] = $this->localizationHandler->getLocalLanguageLabel($label); if ($this->inclusive) { $messages[] = $this->localizationHandler->getLocalLanguageLabel($label . '2'); diff --git a/typo3/sysext/form/Classes/Validation/LengthValidator.php b/typo3/sysext/form/Classes/Validation/LengthValidator.php index b609a0fdd8333f064c2aef4c01b9b164a3b64432..11b1d2bbc8a914c1394ab4a0899d37bdb301efc3 100644 --- a/typo3/sysext/form/Classes/Validation/LengthValidator.php +++ b/typo3/sysext/form/Classes/Validation/LengthValidator.php @@ -112,7 +112,7 @@ class LengthValidator extends \TYPO3\CMS\Form\Validation\AbstractValidator { * @see tx_form_System_Validate_Abstract::_getLocalLanguageLabel() */ protected function getLocalLanguageLabel($type) { - $label = (strtolower(get_class($this)) . '.') . $type; + $label = strtolower(get_class($this)) . '.' . $type; $messages[] = $this->localizationHandler->getLocalLanguageLabel($label); if ($this->maximum !== NULL) { $messages[] = $this->localizationHandler->getLocalLanguageLabel($label . '2'); diff --git a/typo3/sysext/form/Classes/Validation/RequiredValidator.php b/typo3/sysext/form/Classes/Validation/RequiredValidator.php index 06ea49a84ab43a3f1035ff6de4d490a069816f34..348ffba0535ba27157a8190f2b6244b8e9726bb5 100644 --- a/typo3/sysext/form/Classes/Validation/RequiredValidator.php +++ b/typo3/sysext/form/Classes/Validation/RequiredValidator.php @@ -41,7 +41,7 @@ class RequiredValidator extends \TYPO3\CMS\Form\Validation\AbstractValidator { public function isValid() { if ($this->requestHandler->has($this->fieldName)) { $value = $this->requestHandler->getByMethod($this->fieldName); - if ((!empty($value) || $value === 0) || $value === '0') { + if (!empty($value) || $value === 0 || $value === '0') { return TRUE; } } diff --git a/typo3/sysext/form/Classes/View/Confirmation/ConfirmationView.php b/typo3/sysext/form/Classes/View/Confirmation/ConfirmationView.php index 5c9612c6c468612e2b20d511516e6d87bcd7993f..b53504890aeaf9a3c91c8ee664e76320eeb77e75 100644 --- a/typo3/sysext/form/Classes/View/Confirmation/ConfirmationView.php +++ b/typo3/sysext/form/Classes/View/Confirmation/ConfirmationView.php @@ -93,9 +93,9 @@ class ConfirmationView extends \TYPO3\CMS\Form\View\Confirmation\Element\Contain public function get() { $message = $this->getMessage(); $node = $this->render('element', FALSE); - $formInput = (chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8')) . chr(10); + $formInput = chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8') . chr(10); $confirmationButtons = $this->getConfirmationButtons(); - $content = ((($message . chr(10)) . $formInput) . chr(10)) . $confirmationButtons; + $content = $message . chr(10) . $formInput . chr(10) . $confirmationButtons; return $content; } @@ -130,15 +130,15 @@ class ConfirmationView extends \TYPO3\CMS\Form\View\Confirmation\Element\Contain $requestHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Request'); $prefix = $requestHandler->getPrefix(); $action = $this->localCobj->getTypoLink_URL($GLOBALS['TSFE']->id); - $confirmationButtons = (((((((((' - <form class="csc-form-confirmation" method="post" action="' . $action) . '"> + $confirmationButtons = ' + <form class="csc-form-confirmation" method="post" action="' . $action . '"> <fieldset> <ol> <li class="csc-form-confirmation-false"> - <input type="submit" value="') . $this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.donotconfirm')) . '" name="') . $prefix) . '[confirmation-false]" /> + <input type="submit" value="' . $this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.donotconfirm') . '" name="' . $prefix . '[confirmation-false]" /> </li> <li class="csc-form-confirmation-true"> - <input type="submit" value="') . $this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.confirm')) . '" name="') . $prefix) . '[confirmation-true]" /> + <input type="submit" value="' . $this->localizationHandler->getLocalLanguageLabel('tx_form_view_confirmation.confirm') . '" name="' . $prefix . '[confirmation-true]" /> </li> </ol> </fieldset> diff --git a/typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php b/typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php index a559228eb598d66daf849821586362750aff6abf..6dad001dbf7b60261ee805118c87abec18f0a679 100644 --- a/typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php +++ b/typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php @@ -71,7 +71,7 @@ abstract class AbstractElementView { */ public function __construct(\TYPO3\CMS\Form\Domain\Model\Element\AbstractElement $model) { if ($this->isValidModel($model) === FALSE) { - throw new \RuntimeException(('Unexpected model "' . get_class($model)) . '".'); + throw new \RuntimeException('Unexpected model "' . get_class($model) . '".'); } $this->model = $model; } diff --git a/typo3/sysext/form/Classes/View/Form/FormView.php b/typo3/sysext/form/Classes/View/Form/FormView.php index 8f92c486462db2cbdce8dd27aaaf8ca593491430..4f4562d87d98e50f04671b7bfaf3f0d007e70f94 100644 --- a/typo3/sysext/form/Classes/View/Form/FormView.php +++ b/typo3/sysext/form/Classes/View/Form/FormView.php @@ -66,7 +66,7 @@ class FormView extends \TYPO3\CMS\Form\View\Form\Element\ContainerElementView { */ public function get() { $node = $this->render('element', FALSE); - $content = (chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8')) . chr(10); + $content = chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8') . chr(10); return $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/Html/HtmlView.php b/typo3/sysext/form/Classes/View/Mail/Html/HtmlView.php index 6f8fe99d39d12c7d60f7a91d1396c4f19c3beada..5b4a9d83b35c570c5d0575afe4c8fdbd585caf33 100644 --- a/typo3/sysext/form/Classes/View/Mail/Html/HtmlView.php +++ b/typo3/sysext/form/Classes/View/Mail/Html/HtmlView.php @@ -102,7 +102,7 @@ class HtmlView extends \TYPO3\CMS\Form\View\Mail\Html\Element\ContainerElementVi */ public function get() { $node = $this->render('element', FALSE); - $content = (chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8')) . chr(10); + $content = chr(10) . html_entity_decode($node->saveXML($node->firstChild), ENT_QUOTES, 'UTF-8') . chr(10); return $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/MailView.php b/typo3/sysext/form/Classes/View/Mail/MailView.php index 96e65014ede14a7dc431b9d9555f768592138dc5..694a0963d1a440280a151f54cf50bac9b2fac794 100644 --- a/typo3/sysext/form/Classes/View/Mail/MailView.php +++ b/typo3/sysext/form/Classes/View/Mail/MailView.php @@ -125,7 +125,7 @@ class MailView { * @return string The local language message label */ protected function getLocalLanguageLabel($type) { - $label = (strtolower(get_class($this)) . '.') . $type; + $label = strtolower(get_class($this)) . '.' . $type; $message = $this->localizationHandler->getLocalLanguageLabel($label); return $message; } diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxGroupElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxGroupElementView.php index 4fbc656fbd629eb4846b6d5b230b4d138496e283..c223a5073e2fa4444e72dcc71f4f4c4431abd018 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxGroupElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxGroupElementView.php @@ -48,7 +48,7 @@ class CheckboxGroupElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\C public function render() { $content = ''; if ($this->model->additionalIsSet('legend')) { - $content = ($this->model->getAdditionalValue('legend') . ': ') . chr(10); + $content = $this->model->getAdditionalValue('legend') . ': ' . chr(10); } $content .= $this->renderChildren($this->model->getElements(), $this->spaces + 4); return str_repeat(chr(32), $this->spaces) . $content; diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/FileuploadElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/FileuploadElementView.php index 45a7a83882ae49463ded049472604094bb39a1ff..7842e37b937cccb769302c46d9b3dac908d4a6ab 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/FileuploadElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/FileuploadElementView.php @@ -51,7 +51,7 @@ class FileuploadElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Cont * @return string */ public function render() { - $content = ($this->getLabel() . ': ') . $this->model->getValue(); + $content = $this->getLabel() . ': ' . $this->model->getValue(); return str_repeat(chr(32), $this->spaces) . $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/HiddenElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/HiddenElementView.php index a281ada857ff4f34b98d3a0c3ddbdcc832da39de..8cee298c4f753b5502468a9c3604924e7182ba6a 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/HiddenElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/HiddenElementView.php @@ -46,7 +46,7 @@ class HiddenElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Abstract * @return string */ public function render() { - $content = ($this->getLabel() . ': ') . $this->getValue(); + $content = $this->getLabel() . ': ' . $this->getValue(); return str_repeat(chr(32), $this->spaces) . $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioGroupElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioGroupElementView.php index 735ffc2f60837697fb3d507705c2c8dda2158ac9..b24cdea35a29e3d383ebdd585fa127f48038d4f8 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioGroupElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioGroupElementView.php @@ -48,7 +48,7 @@ class RadioGroupElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Cont public function render() { $content = ''; if ($this->model->additionalIsSet('legend')) { - $content = ($this->model->getAdditionalValue('legend') . ': ') . chr(10); + $content = $this->model->getAdditionalValue('legend') . ': ' . chr(10); } $content .= $this->renderChildren($this->model->getElements(), $this->spaces + 4); return str_repeat(chr(32), $this->spaces) . $content; diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/SelectElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/SelectElementView.php index 844e59dfe9e307617f161befacaf9387365106b2..ac53b8387d78f49065cbee9b6b28a1ef6711ce0b 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/SelectElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/SelectElementView.php @@ -46,7 +46,7 @@ class SelectElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Containe * @return string */ public function render() { - $content = (($this->getLabel() . ': ') . chr(10)) . $this->getValues(); + $content = $this->getLabel() . ': ' . chr(10) . $this->getValues(); return str_repeat(chr(32), $this->spaces) . $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextareaElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextareaElementView.php index d36fd558d4fe2bfce8fef7a777d89871dd8499a2..2ed158bee628d9c9cf1f77425846233fdc8b2a19 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextareaElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextareaElementView.php @@ -46,7 +46,7 @@ class TextareaElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Abstra * @return string */ public function render() { - $content = ((($this->getLabel() . ': ') . chr(10)) . str_repeat(chr(32), ($this->spaces + 4))) . $this->getData(); + $content = $this->getLabel() . ': ' . chr(10) . str_repeat(chr(32), ($this->spaces + 4)) . $this->getData(); return str_repeat(chr(32), $this->spaces) . $content; } diff --git a/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextlineElementView.php b/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextlineElementView.php index 1beab2caf51f187a61d2026230451bbd288279f1..5d45f9cd41738a67493cf00c3cb6da288026bc16 100644 --- a/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextlineElementView.php +++ b/typo3/sysext/form/Classes/View/Mail/Plain/Element/TextlineElementView.php @@ -46,7 +46,7 @@ class TextlineElementView extends \TYPO3\CMS\Form\View\Mail\Plain\Element\Abstra * @return string */ public function render() { - $content = ($this->getLabel() . ': ') . $this->getValue(); + $content = $this->getLabel() . ': ' . $this->getValue(); return str_repeat(chr(32), $this->spaces) . $content; } diff --git a/typo3/sysext/form/Classes/View/Wizard/LoadWizardView.php b/typo3/sysext/form/Classes/View/Wizard/LoadWizardView.php index a8d9cfd75b151df0506c829d4ad732ec2da497b4..6a0104fd2355d6ea128aa7381c8ecbf0a441e52c 100644 --- a/typo3/sysext/form/Classes/View/Wizard/LoadWizardView.php +++ b/typo3/sysext/form/Classes/View/Wizard/LoadWizardView.php @@ -60,7 +60,7 @@ class LoadWizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { } $json = json_encode($jsonArray); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header(('Last-Modified: ' . gmdate('D, d M Y H:i:s')) . 'GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Content-Length: ' . strlen($json)); diff --git a/typo3/sysext/form/Classes/View/Wizard/SaveWizardView.php b/typo3/sysext/form/Classes/View/Wizard/SaveWizardView.php index 996bb21434b58a0e6d7a1ba1e5665c8efcda3e69..8a598cb4df5bf9b8e8f4baeb0c4b9925a02b34fb 100644 --- a/typo3/sysext/form/Classes/View/Wizard/SaveWizardView.php +++ b/typo3/sysext/form/Classes/View/Wizard/SaveWizardView.php @@ -66,7 +66,7 @@ class SaveWizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { } $json = json_encode($jsonArray); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header(('Last-Modified: ' . gmdate('D, d M Y H:i:s')) . 'GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Content-Length: ' . strlen($json)); diff --git a/typo3/sysext/form/Classes/View/Wizard/WizardView.php b/typo3/sysext/form/Classes/View/Wizard/WizardView.php index 0843bdd5bb629f935bc889bd0b381771438a9d1b..c6b07d74fdf337d78724c7f1738128670e29a3d7 100644 --- a/typo3/sysext/form/Classes/View/Wizard/WizardView.php +++ b/typo3/sysext/form/Classes/View/Wizard/WizardView.php @@ -119,7 +119,7 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { */ protected function loadJavascript() { $compress = TRUE; - $baseUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(('../../../../../' . \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('form')) . 'Resources/Public/JavaScript/Wizard/'); + $baseUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath('../../../../../' . \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('form') . 'Resources/Public/JavaScript/Wizard/'); $javascriptFiles = array( 'Initialize.js', 'Ux/Ext.ux.merge.js', @@ -235,7 +235,7 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { protected function loadCss() { // TODO Set to TRUE when finished $compress = FALSE; - $baseUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(('../../../../../' . \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('form')) . 'Resources/Public/CSS/'); + $baseUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath('../../../../../' . \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('form') . 'Resources/Public/CSS/'); $cssFiles = array( 'Wizard/Form.css', 'Wizard/Wizard.css' @@ -259,7 +259,7 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { $modTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($pageId, 'mod.wizards.form'); $settings = $modTSconfig['properties']; $this->removeTrailingDotsFromTyposcript($settings); - $this->doc->JScode .= $this->doc->wrapScriptTags(('TYPO3.Form.Wizard.Settings = ' . json_encode($settings)) . ';'); + $this->doc->JScode .= $this->doc->wrapScriptTags('TYPO3.Form.Wizard.Settings = ' . json_encode($settings) . ';'); } /** @@ -330,9 +330,9 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { $buttons['csh_buttons'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_buttons', $GLOBALS['BACK_PATH'], ''); // Close $getPostVariables = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('P'); - $buttons['close'] = ((('<a href="#" onclick="' . htmlspecialchars((('jumpToUrl(unescape(\'' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl($getPostVariables['returnUrl']))) . '\')); return false;'))) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array( + $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(unescape(\'' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl($getPostVariables['returnUrl'])) . '\')); return false;')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array( 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) - ))) . '</a>'; + )) . '</a>'; return $buttons; } diff --git a/typo3/sysext/func/Classes/Controller/PageFunctionsController.php b/typo3/sysext/func/Classes/Controller/PageFunctionsController.php index 06acd473e6a89e45a88127f9244490e35abb069a..417eef24d2c2f91343f972fefe915e45951d0244 100644 --- a/typo3/sysext/func/Classes/Controller/PageFunctionsController.php +++ b/typo3/sysext/func/Classes/Controller/PageFunctionsController.php @@ -60,13 +60,13 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass window.location.href = URL; } '); - $this->doc->postCode = $this->doc->wrapScriptTags((' + $this->doc->postCode = $this->doc->wrapScriptTags(' script_ended = 1; - if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id)) . '; + if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . '; '); // Setting up the context sensitive menu: $this->doc->getContextMenuCode(); - $this->doc->form = ('<form action="index.php" method="post"><input type="hidden" name="id" value="' . $this->id) . '" />'; + $this->doc->form = '<form action="index.php" method="post"><input type="hidden" name="id" value="' . $this->id . '" />'; $vContent = $this->doc->getVersionSelector($this->id, 1); if ($vContent) { $this->content .= $this->doc->section('', $vContent); @@ -118,10 +118,10 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE); if ($this->id && is_array($this->pageinfo)) { // View page - $buttons['view'] = ((((('<a href="#" - onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->pageinfo['uid'], $BACK_PATH, \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->pageinfo['uid'])))) . '" - title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1)) . ' - ">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view')) . '</a>'; + $buttons['view'] = '<a href="#" + onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->pageinfo['uid'], $BACK_PATH, \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" + title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . ' + ">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>'; // Shortcut if ($GLOBALS['BE_USER']->mayMakeShortcut()) { $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);