[TASK] Fix CGL violations against InlineControlStructure
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 1 Jul 2012 15:00:40 +0000 (17:00 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 1 Jul 2012 17:52:12 +0000 (19:52 +0200)
Fix CGL violations against InlineControlStructure

Change-Id: Ibc6ce83f69e45f5ae495d5acd69ac821ce5c10ab
Resolves: #38519
Releases: 6.0
Reviewed-on: http://review.typo3.org/12500
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/statictemplates/media/scripts/gmenu_layers.php
typo3/sysext/statictemplates/media/scripts/plaintextLib.inc
typo3/sysext/statictemplates/media/scripts/tmenu_layers.php
typo3/sysext/sv/class.tx_sv_auth.php
typo3/sysext/sys_note/ext_tables.php
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php
typo3/sysext/wizard_crpages/class.tx_wizardcrpages_webfunc_2.php
typo3/sysext/wizard_sortpages/class.tx_wizardsortpages_webfunc_2.php

index e05c2d1..085ca24 100644 (file)
@@ -152,7 +152,9 @@ GLV_restoreMenu["' . $this->WMid . '"] = "' . $this->WMactiveKey . '";
                        } else {
                                $this->I['linkHREF']['onMouseover'] = 'GL_hideAll("' . $this->WMid . '");' . $this->I['linkHREF']['onMouseover'];
                                        // IESelectFix - Hides IFRAME layer below menu
-                               if ($this->mconf['ieSelectFix']) $this->I['linkHREF']['onMouseover'] = $this->I['linkHREF']['onMouseover'] . 'GL_iframer(\'' . $this->WMid . '\',\'\',false);';
+                               if ($this->mconf['ieSelectFix']) {
+                                       $this->I['linkHREF']['onMouseover'] = $this->I['linkHREF']['onMouseover'] . 'GL_iframer(\'' . $this->WMid . '\',\'\',false);';
+                               }
                                $event = 'GL_resetAll("' . $this->WMid . '");';
                                $this->I['linkHREF']['onMouseout'] .= $event;
                        }
index 0b41897..c130f5d 100644 (file)
@@ -263,8 +263,10 @@ class user_plaintext {
                        $hConf = $this->conf['header.'];
                        $defaultType = t3lib_utility_Math::forceIntegerInRange($hConf['defaultType'], 1, 5);
                        $type=t3lib_utility_Math::forceIntegerInRange($type, 0, 6);
-                       if (!$type)
+                       if (!$type) {
                                $type = $defaultType;
+                       }
+
                        if ($type != 6) {       // not hidden
                                $tConf = $hConf[$type . '.'];
 
@@ -287,8 +289,10 @@ class user_plaintext {
                                }
                                $prefix = '';
                                $str = $this->getString($tConf['prefix']) . $str;
-                               if ($tConf['autonumber'])
-                                       $str=$this->cObj->parentRecordNumber . $str;
+                               if ($tConf['autonumber']) {
+                                       $str = $this->cObj->parentRecordNumber . $str;
+                               }
+
                                if ($this->cObj->data['header_position'] == 'right') {
                                        $prefix=str_pad(' ', ($this->charWidth - strlen($str)));
                                }
@@ -397,8 +401,9 @@ class user_plaintext {
                        $c++;
                        if (trim($substrs)) {
                                $lineParts = explode('|', $substrs);
-                               if (!$cols)
-                                       $cols=count($lineParts);
+                               if (!$cols) {
+                                       $cols = count($lineParts);
+                               }
 
                                for ($a=0; $a<$cols; $a++) {
                                        $jdu = explode(chr(10), $this->breakLines($lineParts[$a], chr(10), ceil($this->charWidth / $cols)));
@@ -464,10 +469,13 @@ class user_plaintext {
                foreach ($tableLines as $k => $v) {
                        foreach ($v as $kk => $vv) {
                                foreach ($vv as $lk => $lv) {
-                                       if (strlen($lv)>intval($maxLen[$kk]))   $maxLen[$kk]=strlen($lv);
+                                       if (strlen($lv) > intval($maxLen[$kk])) {
+                                               $maxLen[$kk] = strlen($lv);
+                                       }
                                }
-                               if (count($vv) > intval($maxLines[$k]))
+                               if (count($vv) > intval($maxLines[$k])) {
                                        $maxLines[$k] = count($vv);
+                               }
                        }
                }
                return array($maxLen, $maxLines);
@@ -514,8 +522,10 @@ class user_plaintext {
                if ($caption) {
                        $lines[] = '';
                        $cHeader = trim($this->getString($this->conf['images.']['captionHeader']));
-                       if ($cHeader)
-                               $lines[]=$cHeader;
+                       if ($cHeader) {
+                               $lines[] = $cHeader;
+                       }
+
                        $lines[] = $this->breakContent($caption);
                }
 
index f492f70..5852938 100644 (file)
@@ -152,7 +152,9 @@ GLV_restoreMenu["' . $this->WMid . '"] = "' . $this->WMactiveKey . '";
                        } else {
                                $this->I['linkHREF']['onMouseover'] = 'GL_hideAll("' . $this->WMid . '");' . $this->I['linkHREF']['onMouseover'];
                                        // IESelectFix - Hides IFRAME layer below menu
-                               if ($this->mconf['ieSelectFix']) $this->I['linkHREF']['onMouseover'] = $this->I['linkHREF']['onMouseover'] . 'GL_iframer(\'' . $this->WMid . '\',\'\',false);';
+                               if ($this->mconf['ieSelectFix']) {
+                                       $this->I['linkHREF']['onMouseover'] = $this->I['linkHREF']['onMouseover'] . 'GL_iframer(\'' . $this->WMid . '\',\'\',false);';
+                               }
                                $event = 'GL_resetAll("' . $this->WMid . '");';
                                $this->I['linkHREF']['onMouseout'] .= $event;
                        }
index fc71d34..6df1463 100644 (file)
@@ -282,7 +282,9 @@ class tx_sv_auth extends tx_sv_authbase {
 
                        // Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
                $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\''.$this->authInfo['HTTP_HOST'].'\')';
-               if (!$this->authInfo['showHiddenRecords'])      $hiddenP = 'AND hidden=0 ';
+               if (!$this->authInfo['showHiddenRecords']) {
+                       $hiddenP = 'AND hidden=0 ';
+               }
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,subgroup', 'fe_groups', 'deleted=0 '.$hiddenP.' AND uid IN ('.$grList.')'.$lockToDomain_SQL);
                        // Internal group record storage
                $groupRows = array();
index 1322cea..6dc52a4 100755 (executable)
@@ -1,6 +1,6 @@
 <?php
 if (!defined('TYPO3_MODE')) {
-       die ('Access denied.');
+       die('Access denied.');
 }
 
 $TCA['sys_note'] = array(
index 838d219..368de83 100644 (file)
@@ -381,7 +381,9 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                                        $params['itemName'] = 'data[' . htmlspecialchars($this->pObj->sObj) . '][name]';
                                        $params['itemValue'] = 'data[' . htmlspecialchars($this->pObj->sObj) . '][propertyValue]';
                                        $TSicon = '<a href="#" onClick="vHWin=window.open(\'' . $url . t3lib_div::implodeArrayForUrl('', array('P'=>$params)) . '\',\'popUp' . $md5ID . '\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;"><img src="' . $BACK_PATH . 'gfx/wizard_tsconfig_s.gif" width="22" height="16" border="0" class="absmiddle" hspace=2 title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:tsRef') . '"></a>';
-                               } else $TSicon = '';
+                               } else {
+                                       $TSicon = '';
+                               }
                                $out = '';
                                $out = '<nobr>' . htmlspecialchars($this->pObj->sObj) . '.';
                                $out .= '<input type="Text" name="data[' . htmlspecialchars($this->pObj->sObj) . '][name]"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' />' . $TSicon . ' = </nobr><br />';
index 573a160..afef22d 100755 (executable)
@@ -111,7 +111,9 @@ class tx_wizardcrpages_webfunc_2 extends t3lib_extobjbase {
                                if (t3lib_div::_GP('createInListEnd')) {
                                        $endI = end($menuItems);
                                        $thePid = -intval($endI['uid']);
-                                       if (!$thePid)   $thePid = $this->pObj->id;
+                                       if (!$thePid) {
+                                               $thePid = $this->pObj->id;
+                                       }
                                } else {
                                        $thePid = $this->pObj->id;
                                }
index 040d830..66af248 100755 (executable)
@@ -122,7 +122,9 @@ class tx_wizardsortpages_webfunc_2 extends t3lib_extobjbase {
                                        // Menu:
                                $lines = array();
                                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_title'), 'title');
-                               if (t3lib_extMgm::isLoaded('cms')) $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_subtitle'), 'subtitle');
+                               if (t3lib_extMgm::isLoaded('cms')) {
+                                       $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_subtitle'), 'subtitle');
+                               }
                                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tChange'), 'tstamp');
                                $lines[] = $this->wiz_linkOrder($LANG->getLL('wiz_changeOrder_tCreate'), 'crdate');
                                $lines[] = '';