[BUGFIX] Fix 4 CGL viol.: LogicalOperatorSpacing*
authorRoland Waldner <most.wanted@gmx.at>
Sun, 13 May 2012 19:19:21 +0000 (21:19 +0200)
committerGeorg Ringer <mail@ringerge.org>
Mon, 14 May 2012 05:03:21 +0000 (07:03 +0200)
on metrics.typo3.org the violations drilldown
says that are some violations against:

LogicalOperatorSpacingNoSpaceBefore (19)
LogicalOperatorSpacingNoSpaceAfter (18)
LogicalOperatorSpacingTooMuchSpaceAfter (17)
LogicalOperatorSpacingTooMuchSpaceBefore (6)

this should be fixed.

after that i guess these coding guidline sniffs
could be activated in the CI-server jobs?

Change-Id: Iffe732fdb94992f814dfaa8e34ccb04d71d8bd7d
Fixes: #37142
Releases: 6.0
Reviewed-on: http://review.typo3.org/11160
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
19 files changed:
typo3/alt_clickmenu.php
typo3/alt_shortcut.php
typo3/class.db_list_extra.inc
typo3/class.webpagetree.php
typo3/index.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
typo3/sysext/indexed_search/class.lexer.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/install/updates/class.tx_coreupdates_addflexformstoacl.php
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/statictemplates/media/scripts/fe_adminLib.inc
typo3/sysext/statictemplates/media/scripts/gmenu_foldout.php
typo3/tce_db.php

index 160061a..bd9d467 100644 (file)
@@ -252,7 +252,7 @@ class clickMenu {
                                }
 
                                $elFromTable = count($this->clipObj->elFromTable($table));
-                               if (!$root && !$DBmount && $elFromTable  && $GLOBALS['TCA'][$table]['ctrl']['sortby'])  $menuItems['pasteafter']=$this->DB_paste($table,-$uid,'after',$elInfo);
+                               if (!$root && !$DBmount && $elFromTable && $GLOBALS['TCA'][$table]['ctrl']['sortby'])   $menuItems['pasteafter']=$this->DB_paste($table,-$uid,'after',$elInfo);
                        }
 
                                // Delete:
index 3651ffe..e911204 100644 (file)
@@ -346,7 +346,7 @@ class SC_alt_shortcut {
 
                        $bgColorClass = $row['uid']==$this->editSC ? 'bgColor5' : ($row['sc_group']<0 ? 'bgColor6' : 'bgColor4');
 
-                       if ($row['description']&&($row['uid']!=$this->editSC))  {
+                       if ($row['description'] && ($row['uid']!=$this->editSC))        {
                                $label = $row['description'];
                        } else {
                                $label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']),150);
index f2839b4..370879e 100644 (file)
@@ -1210,7 +1210,7 @@ class localRecordList extends recordList {
                                        // "New record after" link (ONLY if the records in the table are sorted by a "sortby"-row or if default values can depend on previous record):
                                if ($GLOBALS['TCA'][$table]['ctrl']['sortby'] || $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues']) {
                                        if (
-                                               ($table!='pages' && ($this->calcPerms&16)) ||   // For NON-pages, must have permission to edit content on this parent page
+                                               ($table!='pages' && ($this->calcPerms&16)) ||   // For NON-pages, must have permission to edit content on this parent page
                                                ($table=='pages' && ($this->calcPerms&8))               // For pages, must have permission to create new pages here.
                                                )       {
                                                if ($this->showNewRecLink($table))      {
@@ -1227,7 +1227,7 @@ class localRecordList extends recordList {
                                }
 
                                        // "Up/Down" links
-                               if ($permsEdit && $GLOBALS['TCA'][$table]['ctrl']['sortby']  && !$this->sortField && !$this->searchLevels) {
+                               if ($permsEdit && $GLOBALS['TCA'][$table]['ctrl']['sortby'] && !$this->sortField && !$this->searchLevels) {
                                        if (isset($this->currentTable['prev'][$row['uid']]))    {       // Up
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['prev'][$row['uid']];
                                                $cells['moveUp'] = '<a href="#" onclick="' . htmlspecialchars(
index 3742c36..1fce1f2 100644 (file)
@@ -496,7 +496,7 @@ class webPageTree extends t3lib_browseTree {
                        $this->tree[$treeKey] = array(
                                'row'    => $row,
                                'HTML'   => $HTML,
-                               'hasSub' => $nextCount&&$this->expandNext($newID),
+                               'hasSub' => $nextCount && $this->expandNext($newID),
                                'isFirst'=> $a==1,
                                'isLast' => FALSE,
                                'invertedDepth'=> $depth,
index 8756fd0..b3cfc49 100644 (file)
@@ -505,7 +505,7 @@ class SC_index {
                                        // Get size of random file:
                                $imgSize = @getimagesize($dir.$files[$randImg]);
 
-                               $imgAuthor = is_array($GLOBALS['TBE_STYLES']['loginBoxImage_author'])&&$GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]] ? htmlspecialchars($GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]]) : '';
+                               $imgAuthor = is_array($GLOBALS['TBE_STYLES']['loginBoxImage_author']) && $GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]] ? htmlspecialchars($GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]]) : '';
 
                                        // Create image tag:
                                if (is_array($imgSize)) {
index d0d7207..f4f797f 100755 (executable)
@@ -515,13 +515,13 @@ class SC_db_layout {
                                        $flashMessage = t3lib_div::makeInstance(
                                                't3lib_FlashMessage',
                                                '<p>' . $GLOBALS['LANG']->getLL('goToListModuleMessage') . '</p>
-                                                <br />
-                                                <p>' .
+                                               <br />
+                                               <p>' .
                                                        t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
                                                        '<a href="javascript:top.goToModule( \'web_list\',1);">' .
                                                                $GLOBALS['LANG']->getLL('goToListModule') . '
                                                        </a>
-                                                </p>',
+                                               </p>',
                                                '',
                                                t3lib_FlashMessage::INFO
                                        );
@@ -755,7 +755,7 @@ class SC_db_layout {
 
 
                        // Delete-button flag?
-               $this->deleteButton = (t3lib_utility_Math::canBeInterpretedAsInteger($this->eRParts[1]) && $edit_record && (($this->eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($this->eRParts[0]=='pages'&&($this->CALC_PERMS&4))));
+               $this->deleteButton = (t3lib_utility_Math::canBeInterpretedAsInteger($this->eRParts[1]) && $edit_record && (($this->eRParts[0]!='pages' && $this->EDIT_CONTENT) || ($this->eRParts[0]=='pages' && ($this->CALC_PERMS&4))));
 
                        // If undo-button should be rendered (depends on available items in sys_history)
                $this->undoButton=0;
@@ -790,7 +790,7 @@ class SC_db_layout {
 
                        // Creating editing form:
                if ($GLOBALS['BE_USER']->check('tables_modify',$this->eRParts[0]) && $edit_record
-                       && (($this->eRParts[0] !== 'pages'&& $this->EDIT_CONTENT) || ($this->eRParts[0] === 'pages' && ($this->CALC_PERMS&1)))) {
+                       && (($this->eRParts[0] !== 'pages' && $this->EDIT_CONTENT) || ($this->eRParts[0] === 'pages' && ($this->CALC_PERMS&1)))) {
 
                                // Splitting uid parts for special features, if new:
                        list($uidVal,$ex_pid,$ex_colPos) = explode('/',$this->eRParts[1]);
index 7b3401e..fae8535 100644 (file)
@@ -2342,7 +2342,7 @@ class tslib_fe {
         */
        function locDataCheck($locationData)    {
                $locData = explode(':',$locationData);
-               if (!$locData[1] ||  $this->sys_page->checkRecord($locData[1],$locData[2],1))   {
+               if (!$locData[1] || $this->sys_page->checkRecord($locData[1],$locData[2],1))    {
                        if (count($this->sys_page->getPage($locData[0])))       {       // $locData[1] -check means that a record is checked only if the locationData has a value for a record else than the page.
                                return 1;
                        } else $GLOBALS['TT']->setTSlogMessage('LocationData Error: The page pointed to by location data ('.$locationData.') was not accessible.',2);
@@ -2665,7 +2665,7 @@ class tslib_fe {
 
                        $temp_content = '<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <title>'.$title.'</title>
@@ -3304,7 +3304,7 @@ if (version == "n3") {
                        // Send content-lenght header.
                        // Notice that all HTML content outside the length of the content-length header will be cut off! Therefore content of unknown length from included PHP-scripts and if admin users are logged in (admin panel might show...) or if debug mode is turned on, we disable it!
                if (!empty($this->config['config']['enableContentLengthHeader']) &&
-                       !$this->beUserLogin  &&
+                       !$this->beUserLogin &&
                        !$this->TYPO3_CONF_VARS['FE']['debug'] &&
                        !$this->config['config']['debug'] &&
                        !$this->doWorkspacePreview()
index 221dba6..106399f 100755 (executable)
@@ -100,7 +100,7 @@ class user_feAdmin  {
                $this->preview = (string)t3lib_div::_GP('preview');
                        // backURL is a given URL to return to when login is performed
                $this->backURL = t3lib_div::_GP('backURL');
-               if (strstr($this->backURL, '"') || strstr($this->backURL, "'") || preg_match('/(javascript|vbscript):/i', $this->backURL)  || stristr($this->backURL, "fromcharcode") || strstr($this->backURL, "<") || strstr($this->backURL, ">"))    {
+               if (strstr($this->backURL, '"') || strstr($this->backURL, "'") || preg_match('/(javascript|vbscript):/i', $this->backURL) || stristr($this->backURL, "fromcharcode") || strstr($this->backURL, "<") || strstr($this->backURL, ">"))     {
                        $this->backURL = '';    // Clear backURL if it seems to contain XSS code - only URLs are allowed
                }
                        // Remove host from URL: Make sure that $this->backURL maps to the current site
@@ -917,7 +917,7 @@ class user_feAdmin  {
         */
        function displayCreateScreen()  {
                if ($this->conf['create'])      {
-                       $templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser||$this->conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));
+                       $templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser || $this->conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));
                        $failure = t3lib_div::_GP('noWarnings')?'':$this->failure;
                        if (!$failure)  $templateCode = $this->cObj->substituteSubpart($templateCode, '###SUB_REQUIRED_FIELDS_WARNING###', '');
 
index ba00ba8..bd9c8da 100755 (executable)
@@ -81,7 +81,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
                $this->WMarrowACT='';
                $this->WMimagesFlag=0;
                $this->WMimageHTML ='';
-               if (($this->mconf['arrowNO']||$this->mconf['arrowNO.']) && ($this->mconf['arrowACT']||$this->mconf['arrowACT.']))       {
+               if (($this->mconf['arrowNO'] || $this->mconf['arrowNO.']) && ($this->mconf['arrowACT'] || $this->mconf['arrowACT.']))   {
                        $this->WMarrowNO = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowNO'],$this->mconf['arrowNO.']);
                        $this->WMarrowACT = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowACT'],$this->mconf['arrowACT.']);
                        if (is_array($this->WMarrowACT) && is_array($this->WMarrowNO))  {
index 7f938e1..d73ec9e 100755 (executable)
@@ -589,7 +589,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
 
                $borderColor = $borderColor?$borderColor:'black';
                $borderThickness = $borderThickness?$borderThickness:1;
-               $borderSpace = (($conf['borderSpace']&&$border) ? intval($conf['borderSpace']) : 0);
+               $borderSpace = (($conf['borderSpace'] && $border) ? intval($conf['borderSpace']) : 0);
 
                        // Generate cols
                $cols = intval($this->cObj->stdWrap($conf['cols'],$conf['cols.']));
@@ -812,7 +812,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                if (!is_array($conf['editIcons.'])) {
                        $conf['editIcons.'] = array();
                }
-               $editIconsHTML = $conf['editIcons']&&$GLOBALS['TSFE']->beUserLogin ? $this->cObj->editIcons('',$conf['editIcons'],$conf['editIcons.']) : '';
+               $editIconsHTML = $conf['editIcons'] && $GLOBALS['TSFE']->beUserLogin ? $this->cObj->editIcons('',$conf['editIcons'],$conf['editIcons.']) : '';
 
                        // If noRows, we need multiple imagecolumn wraps
                $imageWrapCols = 1;
index 08d8a0d..6a65a12 100644 (file)
@@ -279,7 +279,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                        $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 {
index 70df0f6..52ee755 100755 (executable)
@@ -327,15 +327,15 @@ class tx_indexedsearch_lexer {
 
                        // LOOKING for Alpha chars (Latin, Cyrillic, Greek, Hebrew and Arabic):
                if (
-                               ($cp >= 0x41 && $cp <= 0x5A) ||         // Basic Latin: capital letters
-                               ($cp >= 0x61 && $cp <= 0x7A) ||         // Basic Latin: small letters
-                               ($cp >= 0xC0 && $cp <= 0xFF && $cp != 0xD7 && $cp != 0xF7) ||                   // Latin-1 Supplement (0x80-0xFF) excluding multiplication and division sign
-                               ($cp >= 0x100 && $cp < 0x280) ||        // Latin Extended-A and -B
+                               ($cp >= 0x41 && $cp <= 0x5A) || // Basic Latin: capital letters
+                               ($cp >= 0x61 && $cp <= 0x7A) || // Basic Latin: small letters
+                               ($cp >= 0xC0 && $cp <= 0xFF && $cp != 0xD7 && $cp != 0xF7) || // Latin-1 Supplement (0x80-0xFF) excluding multiplication and division sign
+                               ($cp >= 0x100 && $cp < 0x280) || // Latin Extended-A and -B
                                ($cp == 0x386 || ($cp >= 0x388 && $cp < 0x400)) || // Greek and Coptic excluding non-letters
-                               (($cp >= 0x400 && $cp < 0x482) || ($cp >= 0x48A && $cp < 0x530)) ||             // Cyrillic and Cyrillic Supplement excluding historic miscellaneous
-                               (($cp >= 0x590 && $cp < 0x5B0) || ($cp >= 0x5D0 && $cp < 0x5F3)) ||     // Hebrew: only accents and letters
-                               (($cp >= 0x621 && $cp <= 0x658) || ($cp >= 0x66E &&  $cp <= 0x6D3)) ||  // Arabic: only letters (there are more letters in the range, we can add them if there is a demand)
-                               ($cp >= 0x1E00 && $cp < 0x2000)         // Latin Extended Additional and Greek Extended
+                               (($cp >= 0x400 && $cp < 0x482) || ($cp >= 0x48A && $cp < 0x530)) ||     // Cyrillic and Cyrillic Supplement excluding historic miscellaneous
+                               (($cp >= 0x590 && $cp < 0x5B0) || ($cp >= 0x5D0 && $cp < 0x5F3)) ||     // Hebrew: only accents and letters
+                               (($cp >= 0x621 && $cp <= 0x658) || ($cp >= 0x66E &&  $cp <= 0x6D3)) || // Arabic: only letters (there are more letters in the range, we can add them if there is a demand)
+                               ($cp >= 0x1E00 && $cp < 0x2000) // Latin Extended Additional and Greek Extended
                        )       {
                        return array('alpha');
                }
@@ -344,13 +344,13 @@ class tx_indexedsearch_lexer {
                        // Ranges are not certain - deducted from the translation tables in t3lib/csconvtbl/
                        // Verified with http://www.unicode.org/charts/ (16/2) - may still not be complete.
                if (
-                               ($cp >= 0x3040 && $cp <= 0x30FF) ||             // HIRAGANA and KATAKANA letters
-                               ($cp >= 0x3130 && $cp <= 0x318F) ||             // Hangul Compatibility Jamo
-                               ($cp >= 0x3400 && $cp <= 0x4DBF) ||             // CJK Unified Ideographs Extension A
-                               ($cp >= 0x4E00 && $cp <= 0x9FAF) ||             // CJK Unified Ideographs
-                               ($cp >= 0xAC00 && $cp <= 0xD7AF) ||             // Hangul Syllables
-                               ($cp >= 0x20000 && $cp <= 0x2FA1F)              // CJK Unified Ideographs Extension B and CJK Compatibility Ideographs Supplement
-                                                                                                               // also include CJK and Kangxi radicals or Bopomofo letter?
+                               ($cp >= 0x3040 && $cp <= 0x30FF) ||     // HIRAGANA and KATAKANA letters
+                               ($cp >= 0x3130 && $cp <= 0x318F) ||     // Hangul Compatibility Jamo
+                               ($cp >= 0x3400 && $cp <= 0x4DBF) ||     // CJK Unified Ideographs Extension A
+                               ($cp >= 0x4E00 && $cp <= 0x9FAF) ||     // CJK Unified Ideographs
+                               ($cp >= 0xAC00 && $cp <= 0xD7AF) ||     // Hangul Syllables
+                               ($cp >= 0x20000 && $cp <= 0x2FA1F)      // CJK Unified Ideographs Extension B and CJK Compatibility Ideographs Supplement
+                                                                       // also include CJK and Kangxi radicals or Bopomofo letter?
                        )       {
                        return array('cjk');
                }
index 429e424..9353c04 100755 (executable)
@@ -653,7 +653,7 @@ class tx_indexedsearch extends tslib_pibase {
                                $this->internal['res_count'] = $resData['count'];
                                $this->internal['results_at_a_time'] = $this->piVars['results'];
                                $this->internal['maxPages'] = t3lib_utility_Math::forceIntegerInRange($this->conf['search.']['page_links'],1,100,10);
-                               $addString = ($resData['count']&&$this->piVars['group']=='sections'&&$freeIndexUid<=0 ? ' '.sprintf($this->pi_getLL(count($this->resultSections)>1?'inNsections':'inNsection'),count($this->resultSections)):'');
+                               $addString = ($resData['count'] && $this->piVars['group']=='sections' && $freeIndexUid<=0 ? ' '.sprintf($this->pi_getLL(count($this->resultSections)>1?'inNsections':'inNsection'),count($this->resultSections)):'');
                                $browseBox1 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
                                $browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid);
                        }
index eae4147..317a00f 100644 (file)
@@ -2908,7 +2908,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                foreach ($paths as $k => $v) {
                        if (!preg_match('/[\\/]$/',$v)) $v.='/';
                        foreach ($programs as $filename) {
-                               if (ini_get('open_basedir') || (file_exists($v)&&@is_file($v.$filename.$isExt))) {
+                               if (ini_get('open_basedir') || (file_exists($v) && @is_file($v.$filename.$isExt))) {
                                        $version = $this->_checkImageMagick_getVersion($filename,$v);
                                        if($version > 0) {
                                                        // Assume GraphicsMagick
index b5d921d..f115588 100644 (file)
@@ -114,7 +114,7 @@ class tx_coreupdates_addflexformstoacl extends Tx_Install_Updates_Base {
                        // Get all excludeable FlexForm fields from content-table
                $flexExcludeFields = array();
                $flexFormArray = t3lib_BEfunc::getRegisteredFlexForms($contentTable);
-               if (!empty($flexFormArray)  && is_array($flexFormArray)) {
+               if (!empty($flexFormArray) && is_array($flexFormArray)) {
                        foreach ($flexFormArray as $tableField => $flexForms) {
                                        // Get all sheets
                                foreach ($flexForms as $flexFormIdentifier => $flexFormConfig) {
index 835f9e4..e88ef89 100644 (file)
@@ -1303,7 +1303,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                if (substr($filename,0,4)=='EXT:')      {       // extension
                        list($extKey,$local) = explode('/',substr($filename,4),2);
                        $newFilename = '';
-                       if (strcmp($extKey,'') &&  t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
+                       if (strcmp($extKey,'') && t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
                                $newFilename = (($this->is_FE() || $this->isFrontendEditActive()) ? t3lib_extMgm::siteRelPath($extKey) : $this->backPath . t3lib_extMgm::extRelPath($extKey)) . $local;
                        }
                } elseif (substr($filename,0,1) != '/') {
@@ -1440,7 +1440,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                $nStyle=array();
                foreach ($styleParts as $k => $p) {
                        $pp = t3lib_div::trimExplode(':',$p);
-                       if ($pp[0]&&$pp[1])     {
+                       if ($pp[0] && $pp[1])     {
                                foreach ($matchParts as $el) {
                                        $star=substr($el,-1)=='*';
                                        if (!strcmp($pp[0],$el) || ($star && t3lib_div::isFirstPartOfStr($pp[0],substr($el,0,-1)) ))    {
index 2dd5a18..31ca509 100644 (file)
@@ -102,7 +102,7 @@ class user_feAdmin  {
                $this->preview = (string)t3lib_div::_GP('preview');
                        // backURL is a given URL to return to when login is performed
                $this->backURL = t3lib_div::_GP('backURL');
-               if (strstr($this->backURL, '"') || strstr($this->backURL, "'") || preg_match('/(javascript|vbscript):/i', $this->backURL)  || stristr($this->backURL, "fromcharcode") || strstr($this->backURL, "<") || strstr($this->backURL, ">"))    {
+               if (strstr($this->backURL, '"') || strstr($this->backURL, "'") || preg_match('/(javascript|vbscript):/i', $this->backURL) || stristr($this->backURL, "fromcharcode") || strstr($this->backURL, "<") || strstr($this->backURL, ">"))     {
                        $this->backURL = '';    // Clear backURL if it seems to contain XSS code - only URLs are allowed
                }
                        // Remove host from URL: Make sure that $this->backURL maps to the current site
@@ -919,7 +919,7 @@ class user_feAdmin  {
         */
        function displayCreateScreen()  {
                if ($this->conf['create'])      {
-                       $templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser||$this->conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));
+                       $templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser || $this->conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));
                        $failure = t3lib_div::_GP('noWarnings')?'':$this->failure;
                        if (!$failure)  $templateCode = $this->cObj->substituteSubpart($templateCode, '###SUB_REQUIRED_FIELDS_WARNING###', '');
 
index e518492..8865448 100644 (file)
@@ -82,7 +82,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
                $this->WMarrowACT='';
                $this->WMimagesFlag=0;
                $this->WMimageHTML ='';
-               if (($this->mconf['arrowNO']||$this->mconf['arrowNO.']) && ($this->mconf['arrowACT']||$this->mconf['arrowACT.']))       {
+               if (($this->mconf['arrowNO'] || $this->mconf['arrowNO.']) && ($this->mconf['arrowACT'] || $this->mconf['arrowACT.']))   {
                        $this->WMarrowNO = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowNO'],$this->mconf['arrowNO.']);
                        $this->WMarrowACT = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowACT'],$this->mconf['arrowACT.']);
                        if (is_array($this->WMarrowACT) && is_array($this->WMarrowNO))  {
index 60b4bab..7c18845 100644 (file)
@@ -191,7 +191,7 @@ class SC_tce_db {
                        $this->tce->clear_cacheCmd($this->cacheCmd);
 
                                // Update page tree?
-                       if ($this->uPT && (isset($this->data['pages'])||isset($this->cmd['pages'])))    {
+                       if ($this->uPT && (isset($this->data['pages']) || isset($this->cmd['pages'])))  {
                                t3lib_BEfunc::setUpdateSignal('updatePageTree');
                        }
                }