[TASK] Fix CGL violations against OpeningFunctionBraceKernighanRitchie
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 21 Sep 2012 17:12:12 +0000 (19:12 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Sep 2012 18:52:00 +0000 (20:52 +0200)
Change-Id: I4267353d2e1d0036278fc33d76f7bfd00868ff1d
Resolves: #41191
Releases: 6.0
Reviewed-on: http://review.typo3.org/14852
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Andy Grunwald
Tested-by: Andy Grunwald
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/cms/tbl_tt_content.php
typo3/sysext/core/Classes/Core/GlobalDebugFunctions.php

index 3e8265d..8e26bc6 100755 (executable)
@@ -31,8 +31,7 @@
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 if (!function_exists('user_sortPluginList')) {
-       function user_sortPluginList(array &$parameters)
-       {
+       function user_sortPluginList(array &$parameters) {
                usort($parameters['items'], create_function('$item1,$item2', 'return strcasecmp($GLOBALS[\'LANG\']->sL($item1[0]),$GLOBALS[\'LANG\']->sL($item2[0]));'));
        }
 }
index 93eb196..f4aeac0 100644 (file)
@@ -1,42 +1,39 @@
 <?php
-
-// Simple debug function which prints output immediately
-               function xdebug($var = '', $debugTitle = 'xdebug')
-               {
+               // Simple debug function which prints output immediately
+       function xdebug($var = '', $debugTitle = 'xdebug') {
                        // If you wish to use the debug()-function, and it does not output something,
                        // please edit the IP mask in TYPO3_CONF_VARS
-                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
-                               return;
-                       }
-                       \TYPO3\CMS\Core\Utility\DebugUtility::debug($var, $debugTitle);
+               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
+                       return;
                }
+               \TYPO3\CMS\Core\Utility\DebugUtility::debug($var, $debugTitle);
+       }
+
                // Debug function which calls $GLOBALS['error'] error handler if available
-               function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = E_DEBUG)
-               {
+       function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = E_DEBUG) {
                        // If you wish to use the debug()-function, and it does not output something,
                        // please edit the IP mask in TYPO3_CONF_VARS
-                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
-                               return;
-                       }
-                       if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debug'))) {
-                               $GLOBALS['error']->debug($variable, $name, $line, $file, $recursiveDepth, $debugLevel);
-                       } else {
-                               $title = $name === '*variable*' ? '' : $name;
-                               $group = $line === '*line*' ? NULL : $line;
-                               \TYPO3\CMS\Core\Utility\DebugUtility::debug($variable, $title, $group);
-                       }
+               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
+                       return;
                }
-               function debugBegin()
-               {
-                       if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugBegin'))) {
-                               $GLOBALS['error']->debugBegin();
-                       }
+               if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debug'))) {
+                       $GLOBALS['error']->debug($variable, $name, $line, $file, $recursiveDepth, $debugLevel);
+               } else {
+                       $title = $name === '*variable*' ? '' : $name;
+                       $group = $line === '*line*' ? NULL : $line;
+                       \TYPO3\CMS\Core\Utility\DebugUtility::debug($variable, $title, $group);
                }
-               function debugEnd()
-               {
-                       if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugEnd'))) {
-                               $GLOBALS['error']->debugEnd();
-                       }
+       }
+
+       function debugBegin() {
+               if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugBegin'))) {
+                       $GLOBALS['error']->debugBegin();
+               }
+       }
+
+       function debugEnd() {
+               if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugEnd'))) {
+                       $GLOBALS['error']->debugEnd();
                }
-               
+       }
 ?>
\ No newline at end of file