[TASK] Fix CGL violations against InlineControlStructure
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 1 Jul 2012 14:36:21 +0000 (16:36 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 1 Jul 2012 23:54:33 +0000 (01:54 +0200)
Fix CGL violations against InlineControlStructure

Change-Id: I93af6623bc7eb1e372e51df61642dbfcf8d80a28
Resolves: #38517
Releases: 6.0
Reviewed-on: http://review.typo3.org/12499
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
25 files changed:
typo3/sysext/install/Classes/Updates/File/TceformsUpdateWizard.php
typo3/sysext/install/ext_localconf.php
typo3/sysext/install/ext_tables.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/lang/res/js/be/typo3lang.js
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner_core.php
typo3/sysext/lowlevel/clmods/class.missing_relations.php
typo3/sysext/lowlevel/clmods/class.orphan_records.php
typo3/sysext/lowlevel/clmods/class.rte_images.php
typo3/sysext/lowlevel/clmods/class.versions.php
typo3/sysext/recycler/classes/helper/class.tx_recycler_helper.php
typo3/sysext/recycler/ext_localconf.php
typo3/sysext/recycler/ext_tables.php
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/ext_localconf.php
typo3/sysext/rtehtmlarea/ext_tables.php
typo3/sysext/rtehtmlarea/hooks/softref/ext_localconf.php
typo3/sysext/rtehtmlarea/hooks/softref/ext_tables.php
typo3/sysext/rtehtmlarea/hooks/statusreport/ext_localconf.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
typo3/sysext/rtehtmlarea/mod5/class.tx_rtehtmlarea_user.php
typo3/sysext/rtehtmlarea/pi1/class.tx_rtehtmlarea_pi1.php
typo3/sysext/rtehtmlarea/tca.php
typo3/sysext/statictemplates/media/scripts/example_keepRollover.php

index 45a3278..4ef1e0c 100644 (file)
@@ -208,7 +208,9 @@ class Tx_Install_Updates_File_TceformsUpdateWizard extends Tx_Install_Updates_Ba
                $i = 0;
                foreach ($fieldItems as $item) {
 
-                       if(!PATH_site) throw new Exception('PATH_site was undefined.');
+                       if(!PATH_site) {
+                               throw new Exception('PATH_site was undefined.');
+                       }
 
                                // copy file
                        $sourcePath = PATH_site . $fieldConfiguration['sourcePath'] . $item;
index 03f8b01..047045e 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
        // TYPO3 4.5 - Check the database to be utf-8 compliant
 $TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['charsetDefaults'] = 'tx_coreupdates_charsetdefaults';
index fd2f117..6a9138c 100755 (executable)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 if (TYPO3_MODE === 'BE') {
        t3lib_extMgm::addModulePath('tools_install', t3lib_extMgm::extPath ($_EXTKEY) . 'mod/');
index 23b95b2..b0b3517 100644 (file)
@@ -462,9 +462,13 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
         * @return void
         */
        function init() {
-               // Must be called after inclusion of init.php (or from init.php)
-               if (!defined('PATH_typo3'))     exit;
-               if (!$this->passwordOK) exit;
+                       // Must be called after inclusion of init.php (or from init.php)
+               if (!defined('PATH_typo3')) {
+                       exit;
+               }
+               if (!$this->passwordOK) {
+                       exit;
+               }
 
                        // Setting stuff...
                $this->check_mail();
@@ -997,7 +1001,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                TRUE,
                                                                TRUE
                                                        );
-                                                       if ($dbname==TYPO3_db)  $dbIncluded=1;
+                                                       if ($dbname == TYPO3_db) {
+                                                               $dbIncluded = 1;
+                                                       }
                                                }
                                                if (!$dbIncluded && TYPO3_db) {
                                                                // // Define the markers content when no access
@@ -1100,8 +1106,11 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
 
                                                        $step4DatabaseTypeOptions = array();
                                                        foreach ($sFiles as $f) {
-                                                               if ($f=='Default TYPO3 Tables') $key='CURRENT_TABLES+STATIC';
-                                                               else $key=htmlspecialchars($f);
+                                                               if ($f == 'Default TYPO3 Tables') {
+                                                                       $key = 'CURRENT_TABLES+STATIC';
+                                                               } else {
+                                                                       $key = htmlspecialchars($f);
+                                                               }
                                                                        // Define the markers content for database type subpart
                                                                $step4DatabaseTypeOptionMarkers = array(
                                                                        'databaseTypeValue' => 'import|' . $key,
@@ -1245,12 +1254,14 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                        $paths=array(ini_get('safe_mode_exec_dir'), '/usr/local/php/bin/');
                }
                if ($this->INSTALL['checkIM']['lzw']) {
-                       $this->checkIMlzw=1;
+                       $this->checkIMlzw = 1;
                }
                if ($this->INSTALL['checkIM']['path']) {
                        $paths[]=trim($this->INSTALL['checkIM']['path']);
                }
-               if ($this->checkIM)     $this->checkImageMagick($paths);
+               if ($this->checkIM)     {
+                       $this->checkImageMagick($paths);
+               }
                $this->checkDatabase();
        }
 
@@ -1718,14 +1729,16 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                $fileCounter = 0;
                $deleteCounter = 0;
                $criteriaMatch = 0;
-               $tmap=array('day'=>1, 'week'=>7, 'month'=>30);
+               $tmap = array('day'=>1, 'week'=>7, 'month'=>30);
                $tt = $this->INSTALL['typo3temp_delete'];
                $subdir = $this->INSTALL['typo3temp_subdir'];
-               if (strlen($subdir) && !preg_match('/^[[:alnum:]_]+\/$/', $subdir))     die('subdir "'.$subdir.'" was not allowed!');
+               if (strlen($subdir) && !preg_match('/^[[:alnum:]_]+\/$/', $subdir))     {
+                       die('subdir "'.$subdir.'" was not allowed!');
+               }
                $action = $this->INSTALL['typo3temp_action'];
                $d = @dir($this->typo3temp_path.$subdir);
                if (is_object($d)) {
-                       while($entry=$d->read()) {
+                       while ($entry = $d->read()) {
                                $theFile = $this->typo3temp_path.$subdir.$entry;
                                if (@is_file($theFile)) {
                                        $ok = 0;
@@ -2089,8 +2102,12 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                                                                        'match! The password was not changed.';
                                                                                                }
                                                                                        }
-                                                                                       if (t3lib_div::_GP('installToolPassword_md5'))  $value =md5($value);
-                                                                               } else $doit=0;
+                                                                                       if (t3lib_div::_GP('installToolPassword_md5')) {
+                                                                                               $value =md5($value);
+                                                                                       }
+                                                                               } else {
+                                                                                       $doit=0;
+                                                                               }
                                                                        }
 
                                                                        $description = trim($commentArr[1][$k][$vk]);
@@ -2111,7 +2128,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                                }
                                                                        }
 
-                                                                       if ($doit && strcmp($GLOBALS['TYPO3_CONF_VARS'][$k][$vk], $value))      $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\''.$k.'\'][\''.$vk.'\']', $value);
+                                                                       if ($doit && strcmp($GLOBALS['TYPO3_CONF_VARS'][$k][$vk], $value)) {
+                                                                               $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\''.$k.'\'][\''.$vk.'\']', $value);
+                                                                       }
                                                                }
                                                        }
                                                }
@@ -2203,7 +2222,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        some extensions.
                                </p>
                        ', 1);
-               } else $this->message($ext, 'Current directory in include path', '', -1);
+               } else {
+                       $this->message($ext, 'Current directory in include path', '', -1);
+               }
 
                        // *****************
                        // File uploads
@@ -2229,7 +2250,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        with \$TYPO3_CONF_VARS[SYS][form_enctype].
                                </p>
                        ', 3);
-               } else $this->message($ext, 'File uploads allowed', '', -1);
+               } else {
+                       $this->message($ext, 'File uploads allowed', '', -1);
+               }
 
                $upload_max_filesize = t3lib_div::getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
                $post_max_size = t3lib_div::getBytesFromSizeMeasurement(ini_get('post_max_size'));
@@ -2911,7 +2934,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                $isExt = TYPO3_OS=='WIN' ? '.exe' : '';
                $this->config_array['im_combine_filename']='combine';
                foreach ($paths as $k => $v) {
-                       if (!preg_match('/[\\/]$/', $v)) $v.='/';
+                       if (!preg_match('/[\\/]$/', $v)) {
+                               $v .= '/';
+                       }
                        foreach ($programs as $filename) {
                                if (ini_get('open_basedir') || (file_exists($v) && @is_file($v.$filename.$isExt))) {
                                        $version = $this->_checkImageMagick_getVersion($filename, $v);
@@ -3027,8 +3052,10 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                        if (@is_file($src) && !strstr($src, ' ') && !strstr($dest, ' ')) {
                                $cmd = t3lib_div::imageMagickCommand('convert', $src.' '.$dest, $path);
                                t3lib_utility_Command::exec($cmd);
-                       } else die('No typo3/gfx/typo3logo.gif file!');
-                       $out='';
+                       } else {
+                               die('No typo3/gfx/typo3logo.gif file!');
+                       }
+                       $out = '';
                        if (@is_file($dest)) {
                                $new_info = @getimagesize($dest);
                                clearstatcache();
@@ -3282,7 +3309,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                        TRUE,
                                                        FALSE
                                                );
-                                               if ($dbname==TYPO3_db)  $dbIncluded=1;
+                                               if ($dbname == TYPO3_db) {
+                                                       $dbIncluded = 1;
+                                               }
                                        }
                                        if (!$dbIncluded && TYPO3_db) {
                                                $databaseItemMarkers['databaseName'] = htmlspecialchars(TYPO3_db);
@@ -3717,9 +3746,10 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        foreach ($this->INSTALL['localconf.php'] as $key => $value) {
                                                switch((string)$key) {
                                                        case 'typo_db_username':
-                                                               if (strlen($value)<50) {
-                                                                       if (strcmp(TYPO3_db_username, $value))
+                                                               if (strlen($value) < 50) {
+                                                                       if (strcmp(TYPO3_db_username, $value)) {
                                                                                $this->setValueInLocalconfFile($lines, '$typo_db_username', trim($value));
+                                                                       }
                                                                } else {
                                                                        $this->errorMessages[] = '
                                                                                Username \'' . $value . '\' was longer
@@ -3729,8 +3759,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                break;
                                                        case 'typo_db_password':
                                                                if (strlen($value)<50) {
-                                                                       if (strcmp(TYPO3_db_password, $value))
+                                                                       if (strcmp(TYPO3_db_password, $value)) {
                                                                                $this->setValueInLocalconfFile($lines, '$typo_db_password', trim($value));
+                                                                       }
                                                                } else {
                                                                        $this->errorMessages[] = '
                                                                                Password was longer than 50 chars (...not saved)
@@ -3739,8 +3770,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                break;
                                                        case 'typo_db_host':
                                                                if (preg_match('/^[a-zA-Z0-9_\.-]+(:.+)?$/', $value) && strlen($value)<50) {
-                                                                       if (strcmp(TYPO3_db_host, $value))
+                                                                       if (strcmp(TYPO3_db_host, $value)) {
                                                                                $this->setValueInLocalconfFile($lines, '$typo_db_host', $value);
+                                                                       }
                                                                } else {
                                                                        $this->errorMessages[] = '
                                                                                Host \'' . $value . '\' was not
@@ -3751,8 +3783,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                break;
                                                        case 'typo_db':
                                                                if (strlen($value)<50) {
-                                                                       if (strcmp(TYPO3_db, $value))
+                                                                       if (strcmp(TYPO3_db, $value)) {
                                                                                $this->setValueInLocalconfFile($lines, '$typo_db', trim($value));
+                                                                       }
                                                                } else {
                                                                        $this->errorMessages[] = '
                                                                                Database name \'' . $value . '\' was
@@ -3761,24 +3794,29 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                }
                                                                break;
                                                        case 'disable_exec_function':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'BE\'][\'disable_exec_function\']', $value ? 1 : 0);
+                                                               }
                                                                break;
                                                        case 'sitename':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'sitename\']', $value);
+                                                               }
                                                                break;
                                                        case 'encryptionKey':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'encryptionKey\']', $value);
+                                                               }
                                                                break;
                                                        case 'compat_version':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'compat_version\']', $value);
+                                                               }
                                                                break;
                                                        case 'im_combine_filename':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'im_combine_filename\']', $value);
+                                                               }
                                                                break;
                                                        case 'gdlib':
                                                        case 'gdlib_png':
@@ -3810,8 +3848,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                }
                                                                break;
                                                        case 'TTFdpi':
-                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'], $value))
+                                                               if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'], $value)) {
                                                                        $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'TTFdpi\']', $value);
+                                                               }
                                                                break;
                                                }
                                        }
@@ -4492,7 +4531,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                $mismatch=FALSE;
                switch (strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'])) {
                        case 'gm':
-                               if (doubleval($im_path_version)>=2)     $mismatch=TRUE;
+                               if (doubleval($im_path_version) >= 2) {
+                                       $mismatch = TRUE;
+                               }
                        break;
                        default:
                                if (($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] ? TRUE : FALSE) != (doubleval($im_path_version) >= 6)) {
@@ -4510,7 +4551,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                </p>
                        ';
                        $etype=2;
-               } else $etype=1;
+               } else {
+                       $etype = 1;
+               }
 
                if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']=='gm') {
                        $msg = str_replace('ImageMagick', 'GraphicsMagick', $msg);
@@ -4596,7 +4639,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                if ($this->isExtensionEnabled($ext, $headCode, 'Read ' . strtoupper($ext))) {
                                                        $imageProc->IM_commands=array();
                                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus.'.$ext;
-                                                       if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                                       if (!@is_file($theFile)) {
+                                                               die('Error: '.$theFile.' was not a file');
+                                                       }
 
                                                        $imageProc->imageMagickConvert_forceFileNameBody='read_'.$ext;
                                                        $fileInfo = $imageProc->imageMagickConvert($theFile, 'jpg', '', '', '', '', '', 1);
@@ -4608,7 +4653,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        if ($this->isExtensionEnabled('pdf', $headCode, 'Read PDF')) {
                                                $imageProc->IM_commands=array();
                                                $theFile = t3lib_extMgm::extPath('install').'imgs/pdf_from_imagemagick.pdf';
-                                               if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                               if (!@is_file($theFile)) {
+                                                       die('Error: '.$theFile.' was not a file');
+                                               }
 
                                                $imageProc->imageMagickConvert_forceFileNameBody='read_pdf';
                                                $fileInfo = $imageProc->imageMagickConvert($theFile, 'jpg', '170', '', '', '', '', 1);
@@ -4618,7 +4665,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        if ($this->isExtensionEnabled('ai', $headCode, 'Read AI')) {
                                                $imageProc->IM_commands=array();
                                                $theFile = t3lib_extMgm::extPath('install').'imgs/typo3logotype.ai';
-                                               if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                               if (!@is_file($theFile)) {
+                                                       die('Error: '.$theFile.' was not a file');
+                                               }
 
                                                $imageProc->imageMagickConvert_forceFileNameBody='read_ai';
                                                $fileInfo = $imageProc->imageMagickConvert($theFile, 'jpg', '170', '', '', '', '', 1);
@@ -4656,7 +4705,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                // Writing GIF
                                        $imageProc->IM_commands=array();
                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus.gif';
-                                       if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                       if (!@is_file($theFile)) {
+                                               die('Error: '.$theFile.' was not a file');
+                                       }
 
                                        $imageProc->imageMagickConvert_forceFileNameBody='write_gif';
                                        $fileInfo = $imageProc->imageMagickConvert($theFile, 'gif', '', '', '', '', '', 1);
@@ -4667,13 +4718,15 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                clearstatcache();
                                                $curSize=t3lib_div::formatSize(@filesize($fileInfo[3]));
                                                $note = array('Note on gif_compress() function:', "The 'gif_compress' method used was '".$returnCode."'.<br />Previous filesize: ".$prevSize.'. Current filesize:'.$curSize);
-                                       } else  $note=array('Note on gif_compress() function:', '<em>Not used! Disabled by [GFX][gif_compress]</em>');
+                                       } else  {
+                                               $note = array('Note on gif_compress() function:', '<em>Not used! Disabled by [GFX][gif_compress]</em>');
+                                       }
                                        $result = $this->displayTwinImage($fileInfo[3], $imageProc->IM_commands, $note);
                                        $this->message($headCode, 'Write GIF', $result[0], $result[1]);
 
 
                                                // Writing PNG
-                                       $imageProc->IM_commands=array();
+                                       $imageProc->IM_commands = array();
                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus.gif';
 
                                        $imageProc->imageMagickConvert_forceFileNameBody='write_png';
@@ -4708,7 +4761,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                // Scaling transparent image
                                        $imageProc->IM_commands=array();
                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus2_transp.gif';
-                                       if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                       if (!@is_file($theFile)) {
+                                               die('Error: '.$theFile.' was not a file');
+                                       }
 
                                        $imageProc->imageMagickConvert_forceFileNameBody='scale_gif';
                                        $fileInfo = $imageProc->imageMagickConvert($theFile, 'gif', '150', '', '', '', '', 1);
@@ -4719,13 +4774,17 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                clearstatcache();
                                                $curSize=t3lib_div::formatSize(@filesize($fileInfo[3]));
                                                $note = array('Note on gif_compress() function:', "The 'gif_compress' method used was '".$returnCode."'.<br />Previous filesize: ".$prevSize.'. Current filesize:'.$curSize);
-                                       } else $note=array('Note on gif_compress() function:', '<em>Not used! Disabled by [GFX][gif_compress]</em>');
+                                       } else {
+                                               $note = array('Note on gif_compress() function:', '<em>Not used! Disabled by [GFX][gif_compress]</em>');
+                                       }
                                        $result = $this->displayTwinImage($fileInfo[3], $imageProc->IM_commands, $note);
                                        $this->message($headCode, 'GIF to GIF, 150 pixels wide', $result[0], $result[1]);
 
                                        $imageProc->IM_commands=array();
                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus2_transp.png';
-                                       if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                       if (!@is_file($theFile)) {
+                                               die('Error: '.$theFile.' was not a file');
+                                       }
 
                                        $imageProc->imageMagickConvert_forceFileNameBody='scale_png';
                                        $fileInfo = $imageProc->imageMagickConvert($theFile, 'png', '150', '', '', '', '', 1);
@@ -4734,7 +4793,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
 
                                        $imageProc->IM_commands=array();
                                        $theFile = t3lib_extMgm::extPath('install').'imgs/jesus2_transp.gif';
-                                       if (!@is_file($theFile))        die('Error: '.$theFile.' was not a file');
+                                       if (!@is_file($theFile)) {
+                                               die('Error: '.$theFile.' was not a file');
+                                       }
                                        $imageProc->imageMagickConvert_forceFileNameBody='scale_jpg';
                                        $fileInfo = $imageProc->imageMagickConvert($theFile, 'jpg', '150', '', '', '', '', 1);
                                        $result = $this->displayTwinImage($fileInfo[3], $imageProc->IM_commands);
@@ -4773,9 +4834,15 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        $input = t3lib_extMgm::extPath('install').'imgs/greenback.gif';
                                        $overlay = t3lib_extMgm::extPath('install').'imgs/jesus.jpg';
                                        $mask = t3lib_extMgm::extPath('install').'imgs/blackwhite_mask.gif';
-                                               if (!@is_file($input))  die('Error: '.$input.' was not a file');
-                                               if (!@is_file($overlay))        die('Error: '.$overlay.' was not a file');
-                                               if (!@is_file($mask))   die('Error: '.$mask.' was not a file');
+                                               if (!@is_file($input)) {
+                                                       die('Error: '.$input.' was not a file');
+                                               }
+                                               if (!@is_file($overlay)) {
+                                                       die('Error: '.$overlay.' was not a file');
+                                               }
+                                               if (!@is_file($mask)) {
+                                                       die('Error: '.$mask.' was not a file');
+                                               }
 
                                        $output = $imageProc->tempPath.$imageProc->filenamePrefix.t3lib_div::shortMD5($imageProc->alternativeOutputKey.'combine1').'.jpg';
                                        $imageProc->combineExec($input, $overlay, $mask, $output, TRUE);
@@ -4788,9 +4855,15 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                        $input = t3lib_extMgm::extPath('install').'imgs/combine_back.jpg';
                                        $overlay = t3lib_extMgm::extPath('install').'imgs/jesus.jpg';
                                        $mask = t3lib_extMgm::extPath('install').'imgs/combine_mask.jpg';
-                                               if (!@is_file($input))  die('Error: '.$input.' was not a file');
-                                               if (!@is_file($overlay))        die('Error: '.$overlay.' was not a file');
-                                               if (!@is_file($mask))   die('Error: '.$mask.' was not a file');
+                                               if (!@is_file($input)) {
+                                                       die('Error: '.$input.' was not a file');
+                                               }
+                                               if (!@is_file($overlay)) {
+                                                       die('Error: '.$overlay.' was not a file');
+                                               }
+                                               if (!@is_file($mask)) {
+                                                       die('Error: '.$mask.' was not a file');
+                                               }
 
                                        $output = $imageProc->tempPath.$imageProc->filenamePrefix.t3lib_div::shortMD5($imageProc->alternativeOutputKey.'combine2').'.jpg';
                                        $imageProc->combineExec($input, $overlay, $mask, $output, TRUE);
@@ -4847,7 +4920,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                // GD from image with box
                                        $imageProc->IM_commands=array();
                                        $input = t3lib_extMgm::extPath('install').'imgs/jesus.'.$imageProc->gifExtension;
-                                               if (!@is_file($input))  die('Error: '.$input.' was not a file');
+                                       if (!@is_file($input)) {
+                                               die('Error: '.$input.' was not a file');
+                                       }
                                        $im = $imageProc->imageCreateFromFile($input);
                                        $workArea=array(0, 0, 170, 136);
                                        $conf=array();
@@ -7531,11 +7606,15 @@ $out="
                        return;
                }
 
-               if ($type==3) { $this->fatalError=1; }
+               if ($type == 3) {
+                       $this->fatalError = 1;
+               }
 
                $long_string = trim($long_string);
 
-               if (!$this->silent)     $this->printSection($head, $short_string, $long_string, $type);
+               if (!$this->silent) {
+                       $this->printSection($head, $short_string, $long_string, $type);
+               }
        }
 
        /**
@@ -7877,8 +7956,10 @@ $out="
         * @return string HTML of the main menu
         */
        function menu() {
-               if ($this->mode !='123') {
-                       if (!$this->passwordOK) return;
+               if ($this->mode != '123') {
+                       if (!$this->passwordOK) {
+                               return;
+                       }
 
                        $c = 0;
                        $items = array();
@@ -8459,7 +8540,9 @@ $out="
                        // remove all existing databases from the list of allowed patterns
                $existingDatabases = $this->getDatabaseList();
                foreach ($allowedPatterns as $index => $pattern) {
-                       if (strpos($pattern, '%') !== FALSE) continue;
+                       if (strpos($pattern, '%') !== FALSE) {
+                               continue;
+                       }
 
                        if (in_array($pattern, $existingDatabases)) {
                                unset($allowedPatterns[$index]);
index c8ab1ce..7d41e7f 100644 (file)
@@ -54,7 +54,9 @@ TYPO3.l10n = function() {
                },
 
                localize: function(label, replace, plural) {
-                       if (typeof lang === 'undefined' || typeof lang[label] === 'undefined') return false;
+                       if (typeof lang === 'undefined' || typeof lang[label] === 'undefined') {
+                               return false;
+                       }
 
                        var i = plural || 0,
                                        translationUnit = lang[label],
index fa537c7..fd8ac6d 100644 (file)
@@ -190,7 +190,9 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
 
                        // Check for filter:
                if ($this->cli_isArg('--filterRegex') && $regex = $this->cli_argValue('--filterRegex', 0)) {
-                       if (!preg_match($regex, $matchString))  return 'BYPASS: Filter Regex "'.$regex.'" did not match string "'.$matchString.'"';
+                       if (!preg_match($regex, $matchString)) {
+                               return 'BYPASS: Filter Regex "'.$regex.'" did not match string "'.$matchString.'"';
+                       }
                }
                        // Check for interactive mode
                if ($this->cli_isArg('-i')) {
@@ -395,14 +397,19 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
                        }
                }
 
-               if ($echoLevel > 0)
+               if ($echoLevel > 0) {
                        echo LF.$accumulatedPath.' ['.$rootID.']'.
                                ($pageRecord['deleted'] ? ' (DELETED)':'').
                                ($this->recStats['versions_published']['pages'][$rootID] ? ' (PUBLISHED)':'');
-               if ($echoLevel > 1 && $this->recStats['versions_lost_workspace']['pages'][$rootID])
+               }
+
+               if ($echoLevel > 1 && $this->recStats['versions_lost_workspace']['pages'][$rootID]) {
                        echo LF.'       ERROR! This version belongs to non-existing workspace ('.$pageRecord['t3ver_wsid'].')!';
-               if ($echoLevel > 1 && $this->recStats['versions_inside_versioned_page']['pages'][$rootID])
+               }
+
+               if ($echoLevel > 1 && $this->recStats['versions_inside_versioned_page']['pages'][$rootID]) {
                        echo LF.'       WARNING! This version is inside an already versioned page or branch!';
+               }
 
                        // Call back:
                if ($callBack) {
@@ -482,7 +489,9 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
                                                        if (is_array($versions)) {
                                                                foreach ($versions as $verRec) {
                                                                        if (!$verRec['_CURRENT_VERSION']) {
-                                                                               if ($echoLevel==3)      echo LF.'               \-[#OFFLINE VERSION: WS#'.$verRec['t3ver_wsid'].'/Cnt:'.$verRec['t3ver_count'].'] '.$tableName.':'.$verRec['uid'].')';
+                                                                               if ($echoLevel == 3) {
+                                                                                       echo LF.'               \-[#OFFLINE VERSION: WS#'.$verRec['t3ver_wsid'].'/Cnt:'.$verRec['t3ver_count'].'] '.$tableName.':'.$verRec['uid'].')';
+                                                                               }
                                                                                $this->recStats['all'][$tableName][$verRec['uid']] = $verRec['uid'];
 
                                                                                        // Register deleted:
index 7dfe24f..9f4e811 100644 (file)
@@ -177,7 +177,9 @@ Reports missing relations';
                                                $error = $sysRefObj->setReferenceValue($hash, NULL);
                                                if ($error) {
                                                        echo '          t3lib_refindex::setReferenceValue(): '.$error.LF;
-                                               } else echo 'DONE';
+                                               } else {
+                                                       echo 'DONE';
+                                               }
                                        }
                                        echo LF;
                                }
index a0624d9..456d0b9 100644 (file)
@@ -167,7 +167,9 @@ Will report orphan uids from TCA tables.';
                                                // Return errors if any:
                                        if (count($tce->errorLog)) {
                                                echo '  ERROR from "TCEmain":'.LF.'TCEmain:'.implode(LF.'TCEmain:', $tce->errorLog);
-                                       } else echo 'DONE';
+                                       } else {
+                                               echo 'DONE';
+                                       }
                                }
                                echo LF;
                        }
index c386cdb..bf5c2d9 100644 (file)
@@ -236,8 +236,12 @@ Reports problems with RTE images';
                                                                                                echo '  - ERROR: File "'.$copyDestName.'" was not created!';
                                                                                        }
                                                                                }
-                                                                       } else echo '   - ERROR: Could not construct new unique names for file!';
-                                                               } else echo '   - ERROR: Maybe directory of file was not within "uploads/"?';
+                                                                       } else {
+                                                                               echo '  - ERROR: Could not construct new unique names for file!';
+                                                                       }
+                                                               } else {
+                                                                       echo '  - ERROR: Maybe directory of file was not within "uploads/"?';
+                                                               }
                                                                echo LF;
                                                        }
                                                        $c++;
index fa09160..fd216ad 100644 (file)
@@ -214,7 +214,9 @@ Automatic Repair:
                                                // Return errors if any:
                                        if (count($tce->errorLog)) {
                                                echo '  ERROR from "TCEmain":'.LF.'TCEmain:'.implode(LF.'TCEmain:', $tce->errorLog);
-                                       } else echo 'DONE';
+                                       } else {
+                                               echo 'DONE';
+                                       }
                                }
                                echo LF;
                        }
@@ -255,7 +257,9 @@ Automatic Repair:
                                        // Return errors if any:
                                if (count($tce->errorLog)) {
                                        echo '  ERROR from "TCEmain":'.LF.'TCEmain:'.implode(LF.'TCEmain:', $tce->errorLog);
-                               } else echo 'DONE';
+                               } else {
+                                       echo 'DONE';
+                               }
                        }
                        echo LF;
                }
index a98cf25..17b684b 100644 (file)
@@ -115,7 +115,9 @@ class tx_recycler_helper {
                                                $output = '<span class="deletedPath">' . $output . '</span>';
                                        }
 
-                                       if ($fullTitleLimit) $fullOutput = '/' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['title'], $fullTitleLimit)) . $fullOutput;
+                                       if ($fullTitleLimit) {
+                                               $fullOutput = '/' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['title'], $fullTitleLimit)) . $fullOutput;
+                                       }
                                } else {
                                        break;
                                }
index 66de57d..40e5a5b 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 $TYPO3_CONF_VARS['BE']['AJAX']['tx_recycler::controller'] = t3lib_extMgm::extPath($_EXTKEY) . 'classes/controller/class.tx_recycler_controller_ajax.php:tx_recycler_controller_ajax->init';
 
index e5f641a..9f3a67f 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 if (TYPO3_MODE == 'BE') {
-
-               // add module
-
+               // Add module
        t3lib_extMgm::addModulePath('web_txrecyclerM1', t3lib_extMgm::extPath ($_EXTKEY).'mod1/');
        t3lib_extMgm::addModule('web', 'txrecyclerM1', '', t3lib_extMgm::extPath($_EXTKEY).'mod1/');
-
 }
+
 ?>
\ No newline at end of file
index 03426d8..01bdd67 100644 (file)
@@ -618,7 +618,9 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        }
                        if (is_array($this->thisConfig['showButtons.'])) {
                                foreach ($this->thisConfig['showButtons.'] as $buttonId => $value) {
-                                       if ($value) $show[] = $buttonId;
+                                       if ($value) {
+                                               $show[] = $buttonId;
+                                       }
                                }
                                $show = array_unique($show);
                        }
@@ -1451,8 +1453,9 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                                        $star=substr($el, -1) == '*';
                                        if (!strcmp($pp[0], $el) || ($star && t3lib_div::isFirstPartOfStr($pp[0], substr($el, 0, -1)) )) {
                                                $nStyle[] = $pp[0] . ':' . $pp[1];
-                                       } else
+                                       } else {
                                                unset($styleParts[$k]);
+                                       }
                                }
                        } else {
                                unset($styleParts[$k]);
index 8f6f513..d4abe1b 100644 (file)
  * @author     Stanislas Rolland <typo3(arobas)sjbr.ca>
  */
 
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
 }
 
-if(!$TYPO3_CONF_VARS['BE']['RTEenabled']) {
+if (!$TYPO3_CONF_VARS['BE']['RTEenabled']) {
        $TYPO3_CONF_VARS['BE']['RTEenabled'] = 1;
 }
 
index 1e3ab34..b8315cb 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
                // Add static template for Click-enlarge rendering
        t3lib_extMgm::addStaticFile($_EXTKEY, 'static/clickenlarge/', 'Clickenlarge Rendering');
@@ -8,7 +10,7 @@ if (!defined ('TYPO3_MODE'))   die ('Access denied.');
        require_once(t3lib_extMgm::extPath($_EXTKEY) . 'hooks/softref/ext_tables.php');
 
                // Add acronyms table
-       $GLOBALS['TCA']['tx_rtehtmlarea_acronym'] = Array (
+       $GLOBALS['TCA']['tx_rtehtmlarea_acronym'] = array (
                'ctrl' => Array (
                        'title' => 'LLL:EXT:rtehtmlarea/locallang_db.xml:tx_rtehtmlarea_acronym',
                        'label' => 'term',
index 098de10..54a1975 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
        // Registering soft reference parser for img tags in RTE content
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['rtehtmlarea_images'] = 'EXT:rtehtmlarea/hooks/softref/class.tx_rtehtmlarea_softrefproc.php:&tx_rtehtmlarea_softrefproc';
index a716193..1544d0c 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
        // Adding soft reference keys in tt_content configuration
        // htmlArea RTE soft reference keys are inserted in front so that their tokens are inserted first
index f1e3489..e0af399 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE')) die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 if (TYPO3_MODE == 'BE') {
                // Take note of conflicting extensions
index 58bad1f..59b47be 100644 (file)
@@ -52,7 +52,9 @@ class tx_rtehtmlarea_pageTree extends rtePageTree {
         */
        function printTree($treeArr='') {
                $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
-               if (!is_array($treeArr))        $treeArr=$this->tree;
+               if (!is_array($treeArr)) {
+                       $treeArr = $this->tree;
+               }
 
                $out='';
                $c=0;
@@ -371,7 +373,9 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                }
                                if ($this->classesAnchorJSOptions[$anchorType] && !($this->buttonConfig['properties.']['class.']['required'] || $this->buttonConfig[$this->act.'.']['properties.']['class.']['required'])) {
                                        $selected = '';
-                                       if (!$this->setClass && !$this->classesAnchorDefault[$anchorType])  $selected = 'selected="selected"';
+                                       if (!$this->setClass && !$this->classesAnchorDefault[$anchorType]) {
+                                               $selected = 'selected="selected"';
+                                       }
                                        $this->classesAnchorJSOptions[$anchorType] =  '<option ' . $selected . ' value=""></option>' . $this->classesAnchorJSOptions[$anchorType];
                                }
                        }
@@ -384,7 +388,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                if (isset($this->curUrlArray['target']) && !(
                                $this->curUrlArray['target'] != $this->defaultLinkTarget
                                && !$classSelected[$this->act]
-                               && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled'] 
+                               && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled']
                                && is_array($this->buttonConfig['popupSelector.']) && $this->buttonConfig['popupSelector.']['disabled']
                                )
                        ) {
@@ -778,7 +782,9 @@ class tx_rtehtmlarea_browse_links extends browse_links {
 
                                                                // URL + onclick event:
                                                        $onClickEvent = '';
-                                                       if (isset($v[$k2i . '.']['target']))    $onClickEvent .= 'browse_links_setTarget(\'' . $v[$k2i . '.']['target'] . '\');';
+                                                       if (isset($v[$k2i . '.']['target'])) {
+                                                               $onClickEvent .= 'browse_links_setTarget(\'' . $v[$k2i . '.']['target'] . '\');';
+                                                       }
                                                        $v[$k2i.'.']['url'] = str_replace('###_URL###', $this->siteURL, $v[$k2i.'.']['url']);
                                                        if (substr($v[$k2i . '.']['url'], 0, 7) == 'http://' || substr($v[$k2i . '.']['url'], 0, 7) == 'mailto:') {
                                                                $onClickEvent .= 'cur_href=unescape(\'' . rawurlencode($v[$k2i . '.']['url']) . '\');link_current();';
index da27efd..4cad6d1 100644 (file)
@@ -52,7 +52,7 @@ class tx_rtehtmlarea_image_folderTree extends TBE_FolderTree {
                if ($this->ext_isLinkable($folderObject)) {
                        $aOnClick = 'return jumpToUrl(\'' . $this->thisScript .
                                '?editorNo=' . $GLOBALS['SOBE']->browser->editorNo .
-                               '&act=' . $GLOBALS['SOBE']->browser->act . 
+                               '&act=' . $GLOBALS['SOBE']->browser->act .
                                '&mode=' . $GLOBALS['SOBE']->browser->mode .
                                '&expandFolder=' . rawurlencode($folderObject->getCombinedIdentifier()) . '\');';
                        return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $title . '</a>';
@@ -1040,18 +1040,34 @@ class tx_rtehtmlarea_select_image extends browse_links {
         */
        protected function setMaximumImageDimensions() {
                if (is_array($this->buttonConfig['options.']) && is_array($this->buttonConfig['options.']['plain.'])) {
-                       if ($this->buttonConfig['options.']['plain.']['maxWidth']) $this->plainMaxWidth = $this->buttonConfig['options.']['plain.']['maxWidth'];
-                       if ($this->buttonConfig['options.']['plain.']['maxHeight']) $this->plainMaxHeight = $this->buttonConfig['options.']['plain.']['maxHeight'];
+                       if ($this->buttonConfig['options.']['plain.']['maxWidth']) {
+                               $this->plainMaxWidth = $this->buttonConfig['options.']['plain.']['maxWidth'];
+                       }
+                       if ($this->buttonConfig['options.']['plain.']['maxHeight']) {
+                               $this->plainMaxHeight = $this->buttonConfig['options.']['plain.']['maxHeight'];
+                       }
+               }
+               if (!$this->plainMaxWidth) {
+                       $this->plainMaxWidth = 640;
+               }
+               if (!$this->plainMaxHeight) {
+                       $this->plainMaxHeight = 680;
                }
-               if (!$this->plainMaxWidth) $this->plainMaxWidth = 640;
-               if (!$this->plainMaxHeight) $this->plainMaxHeight = 680;
                if (is_array($this->buttonConfig['options.']) && is_array($this->buttonConfig['options.']['magic.'])) {
-                       if ($this->buttonConfig['options.']['magic.']['maxWidth']) $this->magicMaxWidth = $this->buttonConfig['options.']['magic.']['maxWidth'];
-                       if ($this->buttonConfig['options.']['magic.']['maxHeight']) $this->magicMaxHeight = $this->buttonConfig['options.']['magic.']['maxHeight'];
+                       if ($this->buttonConfig['options.']['magic.']['maxWidth']) {
+                               $this->magicMaxWidth = $this->buttonConfig['options.']['magic.']['maxWidth'];
+                       }
+                       if ($this->buttonConfig['options.']['magic.']['maxHeight']) {
+                               $this->magicMaxHeight = $this->buttonConfig['options.']['magic.']['maxHeight'];
+                       }
                }
                        // These defaults allow images to be based on their width - to a certain degree - by setting a high height. Then we're almost certain the image will be based on the width
-               if (!$this->magicMaxWidth) $this->magicMaxWidth = 300;
-               if (!$this->magicMaxHeight) $this->magicMaxHeight = 1000;
+               if (!$this->magicMaxWidth) {
+                       $this->magicMaxWidth = 300;
+               }
+               if (!$this->magicMaxHeight) {
+                       $this->magicMaxHeight = 1000;
+               }
        }
 
        /**
index 1d2d270..3c5664f 100644 (file)
@@ -224,7 +224,9 @@ class tx_rtehtmlarea_user {
                                                                        $title = $GLOBALS['LANG']->sL($title, 1);
                                                                }
                                                                $description = $GLOBALS['LANG']->sL($v[$k2i . '.']['description'], 1) . '<br />';
-                                                               if (!$v[$k2i.'.']['dontInsertSiteUrl']) $v[$k2i . '.']['content'] = str_replace('###_URL###', $this->siteUrl, $v[$k2i . '.']['content']);
+                                                               if (!$v[$k2i.'.']['dontInsertSiteUrl']) {
+                                                                       $v[$k2i . '.']['content'] = str_replace('###_URL###', $this->siteUrl, $v[$k2i . '.']['content']);
+                                                               }
 
                                                                $logo = $v[$k2i.'.']['_icon'] ? $v[$k2i.'.']['_icon'] : '';
 
@@ -236,7 +238,9 @@ class tx_rtehtmlarea_user {
                                                                        break;
                                                                        case 'processor':
                                                                                $script = trim($v[$k2i.'.']['submitToScript']);
-                                                                               if (substr($script, 0, 4)!='http') $script = $this->siteUrl.$script;
+                                                                               if (substr($script, 0, 4)!='http') {
+                                                                                       $script = $this->siteUrl.$script;
+                                                                               }
                                                                                if ($script) {
                                                                                        $onClickEvent='processSelection(' . $GLOBALS['LANG']->JScharCode($script) . ');';
                                                                                }
index 66ff401..1a29648 100644 (file)
@@ -74,7 +74,9 @@ class tx_rtehtmlarea_pi1 {
                if (!$this->pspell_is_available || $this->forceCommandMode) {
                        $AspellVersionString = explode('Aspell', shell_exec( $this->AspellDirectory.' -v'));
                        $AspellVersion = substr( $AspellVersionString[1], 0, 4);
-                       if( doubleval($AspellVersion) < doubleval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) echo('Configuration problem: Aspell version ' . $AspellVersion . ' too old. Spell checking cannot be performed in command mode.');
+                       if( doubleval($AspellVersion) < doubleval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) {
+                               echo('Configuration problem: Aspell version ' . $AspellVersion . ' too old. Spell checking cannot be performed in command mode.');
+                       }
                        $this->defaultAspellEncoding = trim(shell_exec($this->AspellDirectory.' config encoding'));
                }
                        // Setting the list of dictionaries
@@ -168,7 +170,9 @@ class tx_rtehtmlarea_pi1 {
                $cmd = t3lib_div::_POST('cmd');
                if ($cmd == 'learn') {
                                // Only availble for BE_USERS, die silently if someone has gotten here by accident
-                       if (TYPO3_MODE !='BE' || !is_object($GLOBALS['BE_USER'])) die('');
+                       if (TYPO3_MODE !='BE' || !is_object($GLOBALS['BE_USER'])) {
+                               die('');
+                       }
                                // Updating the personal word list
                        $to_p_dict = t3lib_div::_POST('to_p_dict');
                        $to_p_dict = $to_p_dict ? $to_p_dict : array();
@@ -230,10 +234,18 @@ class tx_rtehtmlarea_pi1 {
                        $parser = xml_parser_create(strtoupper($this->parserCharset));
                        xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                        xml_set_object($parser, $this);
-                       if (!xml_set_element_handler($parser, 'startHandler', 'endHandler')) echo('Bad xml handler setting');
-                       if (!xml_set_character_data_handler($parser, 'collectDataHandler')) echo('Bad xml handler setting');
-                       if (!xml_set_default_handler($parser, 'defaultHandler')) echo('Bad xml handler setting');
-                       if (!xml_parse($parser, '<?xml version="1.0" encoding="' . $this->parserCharset . '"?><spellchecker> ' . preg_replace('/&nbsp;/'.(($this->parserCharset == 'utf-8')?'u':''), ' ', $content) . ' </spellchecker>')) echo('Bad parsing');
+                       if (!xml_set_element_handler($parser, 'startHandler', 'endHandler')) {
+                               echo('Bad xml handler setting');
+                       }
+                       if (!xml_set_character_data_handler($parser, 'collectDataHandler')) {
+                               echo('Bad xml handler setting');
+                       }
+                       if (!xml_set_default_handler($parser, 'defaultHandler')) {
+                               echo('Bad xml handler setting');
+                       }
+                       if (!xml_parse($parser, '<?xml version="1.0" encoding="' . $this->parserCharset . '"?><spellchecker> ' . preg_replace('/&nbsp;/'.(($this->parserCharset == 'utf-8')?'u':''), ' ', $content) . ' </spellchecker>')) {
+                               echo('Bad parsing');
+                       }
                        if (xml_get_error_code($parser)) {
                                throw new UnexpectedException('Line ' . xml_get_current_line_number($parser) . ': ' . xml_error_string(xml_get_error_code($parser)), 1294585788);
                        }
@@ -362,18 +374,26 @@ var selectedDictionary = "' . $this->dictionary . '";
                                        }
                                } else {
                                        $tmpFileName = t3lib_div::tempnam($this->filePrefix);
-                                       if(!$filehandle = fopen($tmpFileName, 'wb')) echo('SpellChecker tempfile open error');
-                                       if(!fwrite($filehandle, $word)) echo('SpellChecker tempfile write error');
-                                       if(!fclose($filehandle)) echo('SpellChecker tempfile close error');
+                                       if(!$filehandle = fopen($tmpFileName, 'wb')) {
+                                               echo('SpellChecker tempfile open error');
+                                       }
+                                       if(!fwrite($filehandle, $word)) {
+                                               echo('SpellChecker tempfile write error');
+                                       }
+                                       if(!fclose($filehandle)) {
+                                               echo('SpellChecker tempfile close error');
+                                       }
                                        $AspellCommand = 'cat ' . escapeshellarg($tmpFileName) . ' | ' . $this->AspellDirectory . ' -a check --mode=none --sug-mode=' . escapeshellarg($this->pspellMode) . $this->personalDictsArg . ' --lang=' . escapeshellarg($this->dictionary) . ' --encoding=' . escapeshellarg($this->aspellEncoding) . ' 2>&1';
                                        $AspellAnswer = shell_exec($AspellCommand);
                                        $AspellResultLines = array();
                                        $AspellResultLines = t3lib_div::trimExplode(LF, $AspellAnswer, 1);
-                                       if(substr($AspellResultLines[0], 0, 6) == 'Error:') echo('{' . $AspellAnswer . '}');
+                                       if(substr($AspellResultLines[0], 0, 6) == 'Error:') {
+                                               echo('{' . $AspellAnswer . '}');
+                                       }
                                        t3lib_div::unlink_tempfile($tmpFileName);
-                                       if(substr($AspellResultLines['1'], 0, 1) != '*') {
-                                               if(!in_array($word, $this->misspelled)) {
-                                                       if(sizeof($this->misspelled) != 0 ) {
+                                       if (substr($AspellResultLines['1'], 0, 1) != '*') {
+                                               if (!in_array($word, $this->misspelled)) {
+                                                       if (sizeof($this->misspelled) != 0 ) {
                                                                $this->suggestedWords .= ',';
                                                        }
                                                        $suggest = array();
index 38723a6..87f3515 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 $TCA['tx_rtehtmlarea_acronym'] = Array (
        'ctrl' => $TCA['tx_rtehtmlarea_acronym']['ctrl'],
index d42d83e..edae904 100644 (file)
@@ -54,8 +54,12 @@ function user_keepRolloverAtOnClick($I, $conf) {
        } else {
                $I['linkHREF']['onClick'] .= 'ARO_setActiveImg' . '(\'' . $I['theName'] . '\');';
        }
-       if ($I['linkHREF']['onMouseover']) $I['linkHREF']['onMouseover'] = 'ARO_' . $I['linkHREF']['onMouseover'];
-       if ($I['linkHREF']['onMouseout']) $I['linkHREF']['onMouseout'] = 'ARO_' . $I['linkHREF']['onMouseout'];
+       if ($I['linkHREF']['onMouseover']) {
+               $I['linkHREF']['onMouseover'] = 'ARO_' . $I['linkHREF']['onMouseover'];
+       }
+       if ($I['linkHREF']['onMouseout']) {
+               $I['linkHREF']['onMouseout'] = 'ARO_' . $I['linkHREF']['onMouseout'];
+       }
 
        if ($conf['parentObj']->isActive($itemRow['uid'])) {
                $conf['parentObj']->WMextraScript .= '