[TASK] Fix CGL violations against InlineControlStructure
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 29 Jun 2012 20:16:27 +0000 (22:16 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 30 Jun 2012 06:50:16 +0000 (08:50 +0200)
Fix CGL violations against InlineControlStructure

Change-Id: I2935a11c27c22070e9a3f08306c2cf69e3c83dd5
Resolves: #38494
Releases: 6.0
Reviewed-on: http://review.typo3.org/12456
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
19 files changed:
typo3/sysext/aboutmodules/class.tx_aboutmodules_functions.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/class.tslib_search.php
typo3/sysext/cms/tslib/class.tslib_tableoffset.php
typo3/sysext/cms/tslib/content/class.tslib_content_form.php
typo3/sysext/cms/tslib/content/class.tslib_content_records.php
typo3/sysext/cms/tslib/content/class.tslib_content_searchresult.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo_lang.php
typo3/sysext/cshmanual/mod/index.php
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
typo3/template.php
typo3/wizard_add.php
typo3/wizard_forms.php
typo3/wizard_list.php
typo3/wizard_rte.php
typo3/wizard_tsconfig.php

index 28d30e5..16438a4 100644 (file)
@@ -111,8 +111,9 @@ class tx_aboutmodules_Functions {
                        // all items have to be expanded when expandAll is set
                        if ($config['expandAll'] == 1) {
                                foreach ($config as $key => $value) {
-                                       if ($key != 'expandAll')
+                                       if ($key != 'expandAll') {
                                                $config[$key] = 0;
+                                       }
                                }
                        }
                }
@@ -168,7 +169,9 @@ class tx_aboutmodules_Functions {
 
                        // Creating the various links:
                        $label = $GLOBALS['LANG']->moduleLabels['tabs'][$moduleKey];
-                       if ($link && $prefix) $link = $prefix . rawurlencode($link);
+                       if ($link && $prefix) {
+                               $link = $prefix . rawurlencode($link);
+                       }
                        if ($link && !$dontLink) {
                                $label = '<a href="#" onclick="top.goToModule(\'' . $moduleName . '\');' . $onBlur . 'return false;">' . $label . '</a>';
 
@@ -259,7 +262,9 @@ class tx_aboutmodules_Functions {
                                        $label_descr = ' title="' . htmlspecialchars($GLOBALS['LANG']->moduleLabels['labels'][$subKey . 'label']) . '"';
                                        $flabel = htmlspecialchars($label);
                                        $origLink = $link;
-                                       if ($link && $prefix) $link = $prefix . rawurlencode($link);
+                                       if ($link && $prefix) {
+                                               $link = $prefix . rawurlencode($link);
+                                       }
 
                                        // Setting additional JavaScript if frameset script:
                                        $addJS = '';
@@ -610,7 +615,9 @@ class tx_aboutmodules_Functions {
        function wrapLinkWithAB($link) {
                if (!strstr($link, '?')) {
                        return $link . '?';
-               } else return $link;
+               } else {
+                       return $link;
+               }
        }
 
        /**
index b8efcd4..dcc857d 100644 (file)
@@ -324,7 +324,9 @@ class tslib_menu {
                                                        array_merge($this->conf['special.'], array('_altSortField'=>$altSortField)),
                                                        ''
                                                );
-                                               if (!is_array($temp))   $temp=array();
+                                               if (!is_array($temp)) {
+                                                       $temp = array();
+                                               }
                                        break;
                                        case 'language':
                                                $temp = array();
@@ -338,7 +340,9 @@ class tslib_menu {
                                                                // Find overlay record:
                                                        if ($sUid) {
                                                                $lRecs = $this->sys_page->getPageOverlay($GLOBALS['TSFE']->page['uid'], $sUid);
-                                                       } else $lRecs=array();
+                                                       } else {
+                                                               $lRecs = array();
+                                                       }
                                                                // Checking if the "disabled" state should be set.
                                                        if (
                                                                                (t3lib_div::hideIfNotTranslated($GLOBALS['TSFE']->page['l18n_cfg']) && $sUid && !count($lRecs)) // Blocking for all translations?
@@ -413,7 +417,9 @@ class tslib_menu {
 
                                                                                // Add external MP params, then the row:
                                                                        if (is_array($row)) {
-                                                                               if ($MP)        $row['_MP_PARAM'] = $MP.($row['_MP_PARAM'] ? ','.$row['_MP_PARAM'] : '');
+                                                                               if ($MP) {
+                                                                                       $row['_MP_PARAM'] = $MP.($row['_MP_PARAM'] ? ','.$row['_MP_PARAM'] : '');
+                                                                               }
                                                                                $temp[$row['uid']] = $this->sys_page->getPageOverlay($row);
                                                                        }
                                                                }
@@ -446,7 +452,9 @@ class tslib_menu {
                                                                                // Overlays should already have their full MPvars calculated
                                                                        if ($mount_info['overlay']) {
                                                                                $MP = $this->tmpl->getFromMPmap($mount_info['mount_pid']);
-                                                                               if ($MP) unset($row['_MP_PARAM']);
+                                                                               if ($MP) {
+                                                                                       unset($row['_MP_PARAM']);
+                                                                               }
                                                                        }
                                                                } else {
                                                                                // If the mount point could not be fetched with respect to
@@ -464,7 +472,9 @@ class tslib_menu {
 
                                                                // Add external MP params, then the row:
                                                        if (is_array($row)) {
-                                                               if ($MP)        $row['_MP_PARAM'] = $MP.($row['_MP_PARAM'] ? ','.$row['_MP_PARAM'] : '');
+                                                               if ($MP) {
+                                                                       $row['_MP_PARAM'] = $MP.($row['_MP_PARAM'] ? ','.$row['_MP_PARAM'] : '');
+                                                               }
                                                                $temp[] = $this->sys_page->getPageOverlay($row);
                                                        }
                                                }
@@ -655,7 +665,9 @@ class tslib_menu {
                                                                                $temp[$temp_key]['target'] = $this->conf['special.']['targets.'][$k_rl];
                                                                                $temp[$temp_key]['_MP_PARAM'] = implode(',', $rl_MParray);
                                                                        }
-                                                               } else unset($temp[$temp_key]);
+                                                               } else {
+                                                                       unset($temp[$temp_key]);
+                                                               }
                                                        }
                                                                // For normal mount points, set the variable for next level.
                                                        if ($v_rl['_MP_PARAM'] && !$v_rl['_MOUNT_OL']) {
@@ -911,7 +923,9 @@ class tslib_menu {
                        return FALSE;
                }
 
-               if ($data['_SAFE'])     return TRUE;
+               if ($data['_SAFE']) {
+                       return TRUE;
+               }
 
                $uid = $data['uid'];
                        // If the spacer-function is not enabled, spacers will not enter the $menuArr
@@ -1300,7 +1314,9 @@ class tslib_menu {
                        // Overriding URL / Target if set to do so:
                if ($this->menuArr[$key]['_OVERRIDE_HREF']) {
                        $LD['totalURL'] = $this->menuArr[$key]['_OVERRIDE_HREF'];
-                       if ($this->menuArr[$key]['_OVERRIDE_TARGET'])   $LD['target'] = $this->menuArr[$key]['_OVERRIDE_TARGET'];
+                       if ($this->menuArr[$key]['_OVERRIDE_TARGET']) {
+                               $LD['target'] = $this->menuArr[$key]['_OVERRIDE_TARGET'];
+                       }
                }
 
                        // OnClick open in windows.
@@ -1913,7 +1929,9 @@ class tslib_tmenu extends tslib_menu {
                                        }
                                        $this->I['linkHREF']['onMouseover']=$over;
                                        $this->I['linkHREF']['onMouseout']=$out;
-                                       if ($over || $out)      $GLOBALS['TSFE']->setJS('mouseOver');
+                                       if ($over || $out) {
+                                               $GLOBALS['TSFE']->setJS('mouseOver');
+                                       }
 
                                                // Change background color:
                                        if ($this->I['val']['RO_chBgColor']) {
index 4eaaedf..16097b7 100644 (file)
@@ -324,8 +324,9 @@ class TSpagegen {
                                $docTypeParts[] = '<?xml version="1.1" encoding="' . $theCharset . '"?>';
                                break;
                        case '' :
-                               if ($GLOBALS['TSFE']->xhtmlVersion)
+                               if ($GLOBALS['TSFE']->xhtmlVersion) {
                                        $docTypeParts[] = '<?xml version="1.0" encoding="' . $theCharset . '"?>';
+                               }
                                break;
                        default :
                                $docTypeParts[] = $GLOBALS['TSFE']->config['config']['xmlprologue'];
@@ -1000,8 +1001,10 @@ class TSpagegen {
 
                        // Bodytag:
                $defBT = $GLOBALS['TSFE']->pSetup['bodyTagCObject'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($GLOBALS['TSFE']->pSetup['bodyTagCObject'], $GLOBALS['TSFE']->pSetup['bodyTagCObject.'], 'bodyTagCObject') : '';
-               if (! $defBT)
+               if (! $defBT) {
                        $defBT = $GLOBALS['TSFE']->defaultBodyTag;
+               }
+
                $bodyTag = $GLOBALS['TSFE']->pSetup['bodyTag'] ? $GLOBALS['TSFE']->pSetup['bodyTag'] : $defBT;
                if ($bgImg = $GLOBALS['TSFE']->cObj->getImgResource($GLOBALS['TSFE']->pSetup['bgImg'], $GLOBALS['TSFE']->pSetup['bgImg.'])) {
                        $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' background="' . $GLOBALS['TSFE']->absRefPrefix . $bgImg[3] . '">';
index e00eb43..f26af73 100644 (file)
@@ -741,8 +741,12 @@ class tslib_pibase {
                if ($panel) {
                        if ($label) {
                                return '<!-- BEGIN: EDIT PANEL --><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top">'.$label.'</td><td valign="top" align="right">'.$panel.'</td></tr></table><!-- END: EDIT PANEL -->';
-                       } else return '<!-- BEGIN: EDIT PANEL -->'.$panel.'<!-- END: EDIT PANEL -->';
-               } else return $label;
+                       } else {
+                               return '<!-- BEGIN: EDIT PANEL -->'.$panel.'<!-- END: EDIT PANEL -->';
+                       }
+               } else {
+                       return $label;
+               }
        }
 
        /**
index 532365a..3a52dd7 100644 (file)
@@ -140,7 +140,9 @@ class tslib_search {
                                $subparts = explode('-', $parts[1]);
                                foreach ($subparts as $piece) {
                                        $piece=trim($piece);
-                                       if ($piece)             $out[]=$parts[0].'.'.$piece;
+                                       if ($piece) {
+                                               $out[] = $parts[0] . '.' . $piece;
+                                       }
                                }
                        }
                }
index d487934..f5eec18 100644 (file)
@@ -112,10 +112,13 @@ class tslib_tableOffset {
                                // Bottom row:
                        if ($valPairs[3]) {
                                $rows[3] .= '<tr>';
-                               if ($valPairs[0])
+                               if ($valPairs[0]) {
                                        $rows[3] .= '<td></td>';
-                               if ($valPairs[2])
+                               }
+                               if ($valPairs[2]) {
                                        $rows[3] .= '<td>' . $widthImg . '</td>';
+                               }
+
                                $rows[3] .= '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
                                        ($valPairs[2] ? $valPairs[2] : ($valPairs[4] ? $valPairs[4] : 1)) . '" height="' .
                                        $valPairs[3] . '" alt="" title="" /></td>';
index 20c4ed5..e780780 100644 (file)
@@ -231,8 +231,9 @@ class tslib_content_Form extends tslib_content_Abstract {
                                        if (strcmp('', $addParams)) {
                                                $addParams = ' ' . $addParams;
                                        }
-                               } else
+                               } else {
                                        $addParams = '';
+                               }
 
                                $dontMd5FieldNames = isset($conf['dontMd5FieldNames.'])
                                        ? $this->cObj->stdWrap($conf['dontMd5FieldNames'], $conf['dontMd5FieldNames.'])
@@ -387,8 +388,10 @@ class tslib_content_Form extends tslib_content_Abstract {
                                                        if (substr($valueParts[$a], 0, 1) == '*') {
                                                                $sel = 'selected';
                                                                $valueParts[$a] = substr($valueParts[$a], 1);
-                                                       } else
+                                                       } else {
                                                                $sel = '';
+                                                       }
+
                                                                // Get value/label
                                                        $subParts = explode('=', $valueParts[$a]);
                                                                // Sets the value
@@ -447,8 +450,10 @@ class tslib_content_Form extends tslib_content_Abstract {
                                                        if (substr($valueParts[$a], 0, 1) == '*') {
                                                                $sel = 'checked';
                                                                $valueParts[$a] = substr($valueParts[$a], 1);
-                                                       } else
+                                                       } else {
                                                                $sel = '';
+                                                       }
+
                                                                // Get value/label
                                                        $subParts = explode('=', $valueParts[$a]);
                                                                // Sets the value
index 6ea7b82..7a6a5e4 100644 (file)
@@ -60,8 +60,9 @@ class tslib_content_Records extends tslib_content_Abstract {
                        $allowedTables = $tables;
                        if (is_array($conf['conf.'])) {
                                foreach ($conf['conf.'] as $k => $v) {
-                                       if (substr($k, -1) != '.')
+                                       if (substr($k, -1) != '.') {
                                                $allowedTables .= ',' . $k;
+                                       }
                                }
                        }
 
index 35687d9..bea2177 100644 (file)
@@ -181,8 +181,10 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                        $next = '<a href="' . htmlspecialchars($urlParams .
                                                '&spointer=' . ($spointer + $theRange)) . '"' .
                                                $targetPart . $GLOBALS['TSFE']->ATagParams . '>' . $next . '</a>';
-                               } else
+                               } else {
                                        $next = '';
+                               }
+
                                $result = str_replace('###NEXT###', $next, $result);
 
                                if ($rangeLow > 1) {
@@ -190,8 +192,10 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                        $prev = '<a href="' . htmlspecialchars($urlParams .
                                                '&spointer=' . ($spointer - $theRange)) . '"' .
                                                $targetPart . $GLOBALS['TSFE']->ATagParams . '>' . $prev . '</a>';
-                               } else
+                               } else {
                                        $prev = '';
+                               }
+
                                $result = str_replace('###PREV###', $prev, $result);
 
                                        // Searching result
index 5fe5a33..10ac49f 100644 (file)
@@ -99,8 +99,12 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
                if ($this->pObj->MOD_SETTINGS['function']=='tx_cms_webinfo_hits') {
                        $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[stat_type]', $this->pObj->MOD_SETTINGS['stat_type'], $this->pObj->MOD_MENU['stat_type'], 'index.php');
 
-                       if ($this->pObj->MOD_SETTINGS['stat_type']==1)  $dblist->stat_select_field='rl0';
-                       if ($this->pObj->MOD_SETTINGS['stat_type']==2)  $dblist->stat_select_field='rl1';
+                       if ($this->pObj->MOD_SETTINGS['stat_type'] == 1) {
+                               $dblist->stat_select_field = 'rl0';
+                       }
+                       if ($this->pObj->MOD_SETTINGS['stat_type'] == 2) {
+                               $dblist->stat_select_field = 'rl1';
+                       }
 
                                // Timespan
                        for ($a = 0;$a < 30; $a++) {
index 998ffa2..17264f5 100644 (file)
@@ -252,7 +252,9 @@ class tx_cms_webinfo_lang extends t3lib_extobjbase {
                        $editIco = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])).'" title="' . $LANG->getLL('lang_renderl10n_editPageProperties', TRUE) . '">' .
                                        t3lib_iconWorks::getSpriteIcon('actions-document-new') .
                                '</a>';
-               } else $editIco = '';
+               } else {
+                       $editIco = '';
+               }
                $tCells[] = '<td class="c-leftLine" colspan="2">'.
                                        $LANG->getLL('lang_renderl10n_default', '1').':'.
                                        $editIco.
index 627e72c..7279805 100644 (file)
@@ -551,8 +551,12 @@ class SC_view_help {
                                                ';
                                                $code.= '<p><em>' . htmlspecialchars($descr) . '</em></p>
                                                ';
-                                       } else $code .= '<div style="background-color: red; border: 1px solid black; color: white;">NOT AN IMAGE: '.$imgFile.'</div>';
-                               } else $code .= '<div style="background-color: red; border: 1px solid black; color: white;">IMAGE FILE NOT FOUND: '.$image.'</div>';
+                                       } else {
+                                               $code .= '<div style="background-color: red; border: 1px solid black; color: white;">NOT AN IMAGE: '.$imgFile.'</div>';
+                                       }
+                               } else {
+                                       $code .= '<div style="background-color: red; border: 1px solid black; color: white;">IMAGE FILE NOT FOUND: '.$image.'</div>';
+                               }
                        }
                }
 
index e1888a2..22f4df1 100755 (executable)
@@ -124,7 +124,9 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                                // Get bodytext field content
                        $field = (isset($conf['field']) && trim($conf['field']) ? trim($conf['field']) : 'bodytext');
                        $content = trim($this->cObj->data[$field]);
-                       if (!strcmp($content, ''))      return '';
+                       if (!strcmp($content, '')) {
+                               return '';
+                       }
 
                                // get flexform values
                        $caption = trim(htmlspecialchars($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'acctables_caption')));
@@ -168,7 +170,9 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                                                $cells[$a] = substr($cells[$a], 1, -1);
                                        }
 
-                                       if (!strcmp(trim($cells[$a]), ''))      $cells[$a]='&nbsp;';
+                                       if (!strcmp(trim($cells[$a]), '')) {
+                                               $cells[$a] = '&nbsp;';
+                                       }
                                        $cellAttribs = ($noStyles?'':($a>0 && ($cols-1)==$a) ? ' class="td-last td-' . $a . '"' : ' class="td-' . $a . '"');
                                        if (($headerPos == 'top' && !$k) || ($headerPos == 'left' && !$a)) {
                                                $scope = ' scope="' . $headerScope . '"';
index 2bdcfba..0dc0c1c 100644 (file)
@@ -229,20 +229,44 @@ class template {
                }
 
                        // Color scheme:
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor'])    $this->bgColor=$GLOBALS['TBE_STYLES']['mainColors']['bgColor'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor1'])   $this->bgColor1=$GLOBALS['TBE_STYLES']['mainColors']['bgColor1'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor2'])   $this->bgColor2=$GLOBALS['TBE_STYLES']['mainColors']['bgColor2'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor3'])   $this->bgColor3=$GLOBALS['TBE_STYLES']['mainColors']['bgColor3'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor4'])   $this->bgColor4=$GLOBALS['TBE_STYLES']['mainColors']['bgColor4'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor5'])   $this->bgColor5=$GLOBALS['TBE_STYLES']['mainColors']['bgColor5'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor6'])   $this->bgColor6=$GLOBALS['TBE_STYLES']['mainColors']['bgColor6'];
-               if ($GLOBALS['TBE_STYLES']['mainColors']['hoverColor']) $this->hoverColor=$GLOBALS['TBE_STYLES']['mainColors']['hoverColor'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor']) {
+                       $this->bgColor = $GLOBALS['TBE_STYLES']['mainColors']['bgColor'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor1']) {
+                       $this->bgColor1 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor1'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor2']) {
+                       $this->bgColor2 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor2'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor3']) {
+                       $this->bgColor3 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor3'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor4']) {
+                       $this->bgColor4 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor4'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor5']) {
+                       $this->bgColor5 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor5'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor6']) {
+                       $this->bgColor6 = $GLOBALS['TBE_STYLES']['mainColors']['bgColor6'];
+               }
+               if ($GLOBALS['TBE_STYLES']['mainColors']['hoverColor']) {
+                       $this->hoverColor = $GLOBALS['TBE_STYLES']['mainColors']['hoverColor'];
+               }
 
                        // Main Stylesheets:
-               if ($GLOBALS['TBE_STYLES']['stylesheet'])       $this->styleSheetFile = $GLOBALS['TBE_STYLES']['stylesheet'];
-               if ($GLOBALS['TBE_STYLES']['stylesheet2'])      $this->styleSheetFile2 = $GLOBALS['TBE_STYLES']['stylesheet2'];
-               if ($GLOBALS['TBE_STYLES']['styleSheetFile_post'])      $this->styleSheetFile_post = $GLOBALS['TBE_STYLES']['styleSheetFile_post'];
-               if ($GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'])     $this->inDocStyles_TBEstyle = $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'];
+               if ($GLOBALS['TBE_STYLES']['stylesheet']) {
+                       $this->styleSheetFile = $GLOBALS['TBE_STYLES']['stylesheet'];
+               }
+               if ($GLOBALS['TBE_STYLES']['stylesheet2']) {
+                       $this->styleSheetFile2 = $GLOBALS['TBE_STYLES']['stylesheet2'];
+               }
+               if ($GLOBALS['TBE_STYLES']['styleSheetFile_post']) {
+                       $this->styleSheetFile_post = $GLOBALS['TBE_STYLES']['styleSheetFile_post'];
+               }
+               if ($GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle']) {
+                       $this->inDocStyles_TBEstyle = $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'];
+               }
 
                        // include all stylesheets
                foreach ($this->getSkinStylesheetDirectories() as $stylesheetDirectory) {
@@ -250,7 +274,9 @@ class template {
                }
 
                        // Background image
-               if ($GLOBALS['TBE_STYLES']['background'])       $this->backGroundImage = $GLOBALS['TBE_STYLES']['background'];
+               if ($GLOBALS['TBE_STYLES']['background']) {
+                       $this->backGroundImage = $GLOBALS['TBE_STYLES']['background'];
+               }
        }
 
        /**
@@ -397,8 +423,9 @@ class template {
                        $iconImgTag = t3lib_iconWorks::getSpriteIconForRecord($table, $row, array('title' => htmlspecialchars($path)));
                        $title = strip_tags(t3lib_BEfunc::getRecordTitle($table, $row));
                        $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'], $this->backPath, '');
-                       if ($table == 'pages')
+                       if ($table == 'pages') {
                                $path .= ' - ' . t3lib_BEfunc::titleAttribForPages($row, '', 0);
+                       }
                } else {
                        $iconImgTag = t3lib_iconWorks::getSpriteIcon('apps-pagetree-page-domain', array('title' => htmlspecialchars($path)));
                        $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
@@ -446,10 +473,12 @@ class template {
                }
 
                if (!strcmp($motherModName, '1')) {
-                       $mMN="&motherModName='+top.currentModuleLoaded+'";
+                       $mMN = "&motherModName='+top.currentModuleLoaded+'";
                } elseif ($motherModName) {
-                       $mMN='&motherModName='.rawurlencode($motherModName);
-               } else $mMN='';
+                       $mMN = '&motherModName='.rawurlencode($motherModName);
+               } else {
+                       $mMN = '';
+               }
 
                $onClick = 'top.ShortcutManager.createShortcut('
                        .$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeBookmark')).', '
@@ -791,7 +820,7 @@ class template {
 
                if ($this->docType == 'xhtml_frames') {
                        return $str;
-               } else
+               } else {
                        $str .= $this->docBodyTagBegin().
                                ($this->divClass ?
 '
@@ -800,6 +829,7 @@ class template {
 <div class="' . $this->divClass . '">
 '
                                        : '' ) . trim($this->form);
+               }
                return $str;
        }
 
@@ -835,7 +865,9 @@ class template {
 
 
                        // Logging: Can't find better place to put it:
-               if (TYPO3_DLOG) t3lib_div::devLog('END of BACKEND session', 'template', 0, array('_FLUSH' => TRUE));
+               if (TYPO3_DLOG) {
+                       t3lib_div::devLog('END of BACKEND session', 'template', 0, array('_FLUSH' => TRUE));
+               }
 
                return $str;
        }
@@ -965,8 +997,8 @@ class template {
         */
        function sectionBegin() {
                if (!$this->sectionFlag) {
-                       $this->sectionFlag=1;
-                       $str='
+                       $this->sectionFlag = 1;
+                       $str = '
 
        <!-- ***********************
              Begin output section.
@@ -974,7 +1006,9 @@ class template {
        <div>
 ';
                        return $str;
-               } else return '';
+               } else {
+                       return '';
+               }
        }
 
        /**
@@ -986,14 +1020,16 @@ class template {
         */
        function sectionEnd() {
                if ($this->sectionFlag) {
-                       $this->sectionFlag=0;
+                       $this->sectionFlag = 0;
                        return '
        </div>
        <!-- *********************
              End output section.
             ********************* -->
 ';
-               } else return '';
+               } else {
+                       return '';
+               }
        }
 
        /**
index 26b96a5..67f464d 100644 (file)
@@ -91,7 +91,9 @@ class SC_wizard_add {
                        // Set [params][pid]
                if (substr($this->P['params']['pid'], 0, 3) == '###' && substr($this->P['params']['pid'], -3)=='###') {
                        $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'], 3, -3)]);
-               } else $this->pid = intval($this->P['params']['pid']);
+               } else {
+                       $this->pid = intval($this->P['params']['pid']);
+               }
 
                        // Return if new record as parent (not possibly/allowed)
                if (!strcmp($this->pid, '')) {
index 66c9e9f..352a7b5 100644 (file)
@@ -716,9 +716,15 @@ class SC_wizard_forms {
                                        $tArr = array('', '', '', '', '', '');
                                        switch((string)$vv['type']) {
                                                case 'textarea':
-                                                       if (intval($vv['cols']))        $tArr[0] = intval($vv['cols']);
-                                                       if (intval($vv['rows']))        $tArr[1] = intval($vv['rows']);
-                                                       if (trim($vv['extra']))         $tArr[2] = trim($vv['extra']);
+                                                       if (intval($vv['cols'])) {
+                                                               $tArr[0] = intval($vv['cols']);
+                                                       }
+                                                       if (intval($vv['rows'])) {
+                                                               $tArr[1] = intval($vv['rows']);
+                                                       }
+                                                       if (trim($vv['extra'])) {
+                                                               $tArr[2] = trim($vv['extra']);
+                                                       }
                                                        if (strlen($vv['specialEval'])) {
                                                                        // Preset blank default value so position 3 can get a value...
                                                                $thisLine[2] = '';
@@ -727,8 +733,12 @@ class SC_wizard_forms {
                                                break;
                                                case 'input':
                                                case 'password':
-                                                       if (intval($vv['size']))        $tArr[0] = intval($vv['size']);
-                                                       if (intval($vv['max']))         $tArr[1] = intval($vv['max']);
+                                                       if (intval($vv['size'])) {
+                                                               $tArr[0] = intval($vv['size']);
+                                                       }
+                                                       if (intval($vv['max'])) {
+                                                               $tArr[1] = intval($vv['max']);
+                                                       }
                                                        if (strlen($vv['specialEval'])) {
                                                                        // Preset blank default value so position 3 can get a value...
                                                                $thisLine[2] = '';
@@ -736,16 +746,26 @@ class SC_wizard_forms {
                                                        }
                                                break;
                                                case 'file':
-                                                       if (intval($vv['size']))        $tArr[0] = intval($vv['size']);
+                                                       if (intval($vv['size'])) {
+                                                               $tArr[0] = intval($vv['size']);
+                                                       }
                                                break;
                                                case 'select':
-                                                       if (intval($vv['size']))        $tArr[0] = intval($vv['size']);
-                                                       if ($vv['autosize'])    $tArr[0] = 'auto';
-                                                       if ($vv['multiple'])    $tArr[1] = 'm';
+                                                       if (intval($vv['size'])) {
+                                                               $tArr[0] = intval($vv['size']);
+                                                       }
+                                                       if ($vv['autosize']) {
+                                                               $tArr[0] = 'auto';
+                                                       }
+                                                       if ($vv['multiple']) {
+                                                               $tArr[1] = 'm';
+                                                       }
                                                break;
                                        }
                                        $tArr = $this->cleanT($tArr);
-                                       if (count($tArr))       $thisLine[1].=','.implode(',', $tArr);
+                                       if (count($tArr)) {
+                                               $thisLine[1] .= ','.implode(',', $tArr);
+                                       }
 
                                        $thisLine[1] = str_replace('|', '', $thisLine[1]);
 
@@ -753,11 +773,15 @@ class SC_wizard_forms {
                                        if ($vv['type'] == 'select' || $vv['type'] == 'radio') {
                                                $thisLine[2] = str_replace(LF, ', ', str_replace(',', '', $vv['options']));
                                        } elseif ($vv['type'] == 'check') {
-                                               if ($vv['default'])     $thisLine[2] = 1;
+                                               if ($vv['default']) {
+                                                       $thisLine[2] = 1;
+                                               }
                                        } elseif (strcmp(trim($vv['default']), '')) {
                                                $thisLine[2] = $vv['default'];
                                        }
-                                       if (isset($thisLine[2]))                $thisLine[2] = str_replace('|', '', $thisLine[2]);
+                                       if (isset($thisLine[2])) {
+                                               $thisLine[2] = str_replace('|', '', $thisLine[2]);
+                                       }
                                }
 
                                        // Compile the final line:
index 742260b..7a2dda5 100644 (file)
@@ -87,7 +87,9 @@ class SC_wizard_list {
                        // Set [params][pid]
                if (substr($this->P['params']['pid'], 0, 3) == '###' && substr($this->P['params']['pid'], -3) == '###') {
                        $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'], 3, -3)]);
-               } else $this->pid = intval($this->P['params']['pid']);
+               } else {
+                       $this->pid = intval($this->P['params']['pid']);
+               }
 
                        // Make redirect:
                        // If pid is blank OR if id is set, then return...
index b4a6ee2..c10a9e8 100644 (file)
@@ -296,7 +296,9 @@ class SC_wizard_rte {
                        if ($hasAccess) {
                                $hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec);
                        }
-               } else $hasAccess = FALSE;
+               } else {
+                       $hasAccess = FALSE;
+               }
 
                return $hasAccess;
        }
index a97b733..f3ac125 100644 (file)
@@ -298,8 +298,12 @@ class SC_wizard_tsconfig {
                                        t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
                                        htmlspecialchars($obj_string).
                                        '</a><br />';
-                       if ($rec['title'])      $out .= '<strong>'.htmlspecialchars($rec['title']).': </strong>';
-                       if ($rec['description'])        $out .= nl2br(htmlspecialchars(trim($rec['description']))).'<br />';
+                       if ($rec['title']) {
+                               $out .= '<strong>'.htmlspecialchars($rec['title']).': </strong>';
+                       }
+                       if ($rec['description']) {
+                               $out .= nl2br(htmlspecialchars(trim($rec['description']))).'<br />';
+                       }
 
                                // Printing the content:
                        $out .= '<br />'.$this->printTable($table, $obj_string, $objTree[$mode.'.']);
@@ -394,7 +398,9 @@ class SC_wizard_tsconfig {
                reset($strArr);
                if (count($strArr) > 1) {
                        array_shift($strArr);
-                       if (!isset($objTree[$key.'.'])) $objTree[$key.'.'] = array();
+                       if (!isset($objTree[$key.'.'])) {
+                               $objTree[$key.'.'] = array();
+                       }
                        $this->setObj($objTree[$key.'.'], $strArr, $params);
                } else {
                        $objTree[$key]=$params;