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

Change-Id: Id745bfbb69f696045040c2ff635ed982e9d2d933
Resolves: #38514
Releases: 6.0
Reviewed-on: http://review.typo3.org/12497
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
14 files changed:
typo3/sysext/form/Resources/Public/JavaScript/Wizard/Ux/Ext.ux.spinner.js
typo3/sysext/impexp/app/index.php
typo3/sysext/impexp/class.tx_impexp.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/class.external_parser.php
typo3/sysext/indexed_search/class.indexer.php
typo3/sysext/indexed_search/class.lexer.php
typo3/sysext/indexed_search/ext_localconf.php
typo3/sysext/indexed_search/ext_tables.php
typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php
typo3/sysext/indexed_search/tca.php
typo3/sysext/indexed_search_mysql/ext_localconf.php
typo3/sysext/info_pagetsconfig/class.tx_infopagetsconfig_webinfo.php

index 64b1d67..bbf51eb 100644 (file)
@@ -284,12 +284,12 @@ Ext.ux.Spinner = Ext.extend(Ext.util.Observable, {
                if (delta > 0) {
                        this.onSpinUp();
                        e.stopEvent();
-               }
-               else
+               } else {
                        if (delta < 0) {
                                this.onSpinDown();
                                e.stopEvent();
                        }
+               }
        },
 
        //private
index b900e9a..7680a52 100755 (executable)
@@ -179,12 +179,16 @@ class localPageTree extends t3lib_browseTree {
                if ($isOpen) {
                                // Set depth:
                        $depthD = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/ol/blank.gif', 'width="18" height="16"').' align="top" alt="" />';
-                       if ($this->addSelfId)   $this->ids[] = $pid;
+                       if ($this->addSelfId) {
+                               $this->ids[] = $pid;
+                       }
                        $this->getTree($pid, 999, $depthD);
 
                        $idH = array();
                        $idH[$pid]['uid'] = $pid;
-                       if (count($this->buffer_idH))   $idH[$pid]['subrow'] = $this->buffer_idH;
+                       if (count($this->buffer_idH)) {
+                               $idH[$pid]['subrow'] = $this->buffer_idH;
+                       }
                        $this->buffer_idH = $idH;
 
                }
@@ -973,7 +977,9 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                if ($tempDir) {
                        $thumbnails = t3lib_div::getFilesInDir($tempDir, 'png,gif,jpg');
                        array_unshift($thumbnails, '');
-               } else $thumbnails = FALSE;
+               } else {
+                       $thumbnails = FALSE;
+               }
                $row[] = '
                                <tr class="bgColor4">
                                        <td><strong>'.$LANG->getLL('makesavefo_metaData', 1).'</strong>'.t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'metadata', $GLOBALS['BACK_PATH'], '').'</td>
@@ -1542,7 +1548,9 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                $isSelFlag = 0;
                foreach ($optValues as $k => $v) {
                        $sel = (!strcmp($k, $value) ? ' selected="selected"' : '');
-                       if ($sel)       $isSelFlag++;
+                       if ($sel) {
+                               $isSelFlag++;
+                       }
                        $opt[] = '<option value="'.htmlspecialchars($k).'"'.$sel.'>'.htmlspecialchars($v).'</option>';
                }
                if (!$isSelFlag && strcmp('', $value)) {
index ea55a81..2955b0e 100755 (executable)
@@ -408,9 +408,15 @@ class tx_impexp {
                                                        // Add information about the softrefs to header:
                                                $this->dat['header']['records'][$table][$row['uid']]['softrefs'] = $this->flatSoftRefs($this->dat['records'][$table.':'.$row['uid']]['rels']);
 
-                                       } else $this->error('Record '.$table.':'.$row['uid'].' was larger than maxRecordSize ('.t3lib_div::formatSize($this->maxRecordSize).')');
-                               } else $this->error('Record '.$table.':'.$row['uid'].' already added.');
-                       } else $this->error('Record '.$table.':'.$row['uid'].' was outside your DB mounts!');
+                                       } else {
+                                               $this->error('Record '.$table.':'.$row['uid'].' was larger than maxRecordSize ('.t3lib_div::formatSize($this->maxRecordSize).')');
+                                       }
+                               } else {
+                                       $this->error('Record '.$table.':'.$row['uid'].' already added.');
+                               }
+                       } else {
+                               $this->error('Record '.$table.':'.$row['uid'].' was outside your DB mounts!');
+                       }
                }
        }
 
@@ -488,7 +494,9 @@ class tx_impexp {
                                        }
                                }
                        }
-               } else $this->error('There were no records available.');
+               } else {
+                       $this->error('There were no records available.');
+               }
 
                        // Now, if there were new records to add, do so:
                if (count($addR)) {
@@ -635,7 +643,9 @@ class tx_impexp {
                                        }
                                }
                        }
-               } else $this->error('There were no records available.');
+               } else {
+                       $this->error('There were no records available.');
+               }
        }
 
        /**
@@ -761,9 +771,12 @@ class tx_impexp {
                                                }
                                        }
                                }
-
-                       } else  $this->error($fI['ID_absFile'].' was larger ('.t3lib_div::formatSize(filesize($fI['ID_absFile'])).') than the maxFileSize ('.t3lib_div::formatSize($this->maxFileSize).')! Skipping.');
-               } else $this->error($fI['ID_absFile'].' was not a file! Skipping.');
+                       } else {
+                               $this->error($fI['ID_absFile'].' was larger ('.t3lib_div::formatSize(filesize($fI['ID_absFile'])).') than the maxFileSize ('.t3lib_div::formatSize($this->maxFileSize).')! Skipping.');
+                       }
+               } else {
+                       $this->error($fI['ID_absFile'].' was not a file! Skipping.');
+               }
        }
 
        /**
@@ -982,7 +995,9 @@ class tx_impexp {
         * @return string Content stream.
         */
        function addFilePart($data, $compress = FALSE) {
-               if ($compress)  $data = gzcompress($data);
+               if ($compress) {
+                       $data = gzcompress($data);
+               }
                return md5($data).':'.
                                ($compress?'1':'0').':'.
                                str_pad(strlen($data), 10, '0', STR_PAD_LEFT).':'.
@@ -1166,7 +1181,9 @@ class tx_impexp {
                                        }
                                }
                        }
-               } else $this->error('Error: No records defined in internal data array.');
+               } else {
+                       $this->error('Error: No records defined in internal data array.');
+               }
 
                        // Now write to database:
                $tce = $this->getNewTCE();
@@ -1206,7 +1223,9 @@ class tx_impexp {
 
                if (is_array($this->dat['header']['pagetree'])) {
                        $pagesFromTree = $this->flatInversePageTree($this->dat['header']['pagetree']);
-               } else $pagesFromTree = array();
+               } else {
+                       $pagesFromTree = array();
+               }
 
                if (is_array($this->dat['header']['pid_lookup'])) {
                        foreach ($this->dat['header']['pid_lookup'] as $pid => $recList) {
@@ -1267,7 +1286,9 @@ class tx_impexp {
                                        $ID = uniqid('NEW');
                                }
                                $this->import_newId[$table.':'.$ID] = array('table' => $table, 'uid' => $uid);
-                               if ($table == 'pages')  $this->import_newId_pids[$uid] = $ID;
+                               if ($table == 'pages') {
+                                       $this->import_newId_pids[$uid] = $ID;
+                               }
 
                                        // Set main record data:
                                $this->import_data[$table][$ID] = $record;
@@ -1332,7 +1353,9 @@ class tx_impexp {
                                } elseif ($this->update) {
                                                // Map same ID to same ID....
                                        $this->import_mapId[$table][$old_uid] = $id;
-                               } else $this->error('Possible error: '.$table.':'.$old_uid.' had no new id assigned to it. This indicates that the record was not added to database during import. Please check changelog!', 1);
+                               } else {
+                                       $this->error('Possible error: '.$table.':'.$old_uid.' had no new id assigned to it. This indicates that the record was not added to database during import. Please check changelog!', 1);
+                               }
                        }
                }
        }
@@ -1365,7 +1388,9 @@ class tx_impexp {
                                if (is_file($fileName)) {
                                        $this->error('Error: '.$fileName.' was NOT unlinked as it should have been!', 1);
                                }
-                       } else $this->error('Error: '.$fileName.' was not in temp-path. Not removed!', 1);
+                       } else {
+                               $this->error('Error: '.$fileName.' was not in temp-path. Not removed!', 1);
+                       }
                }
                $this->unlinkFiles = array();
        }
@@ -1409,7 +1434,7 @@ class tx_impexp {
                                                        case 'file':
                                                                if (is_array($config['newValueFiles']) && count($config['newValueFiles'])) {
                                                                        $valArr = array();
-                                                                       foreach($config['newValueFiles'] as $fI) {
+                                                                       foreach ($config['newValueFiles'] as $fI) {
                                                                                $valArr[] = $this->import_addFileNameToBeCopied($fI);
                                                                        }
                                                                        $updateData[$table][$thisNewUid][$field] = implode(',', $valArr);       // List of absolute files
@@ -1417,8 +1442,12 @@ class tx_impexp {
                                                        break;
                                                }
                                        }
-                               } else $this->error('Error: no record was found in data array!', 1);
-                       } else $this->error('Error: this records is NOT created it seems! ('.$table.':'.$uid.')', 1);
+                               } else {
+                                       $this->error('Error: no record was found in data array!', 1);
+                               }
+                       } else {
+                               $this->error('Error: this records is NOT created it seems! ('.$table.':'.$uid.')', 1);
+                       }
                }
                if (count($updateData)) {
                        $tce = $this->getNewTCE();
@@ -1445,13 +1474,10 @@ class tx_impexp {
 
                foreach ($itemArray as $relDat) {
                        if (is_array($this->import_mapId[$relDat['table']]) && isset($this->import_mapId[$relDat['table']][$relDat['id']])) {
-
                                $valArray[] = $relDat['table'].'_'.$this->import_mapId[$relDat['table']][$relDat['id']];
                        } elseif ($this->isTableStatic($relDat['table']) || $this->isExcluded($relDat['table'], $relDat['id']) || $relDat['id']<0) {    // Checking for less than zero because some select types could contain negative values, eg. fe_groups (-1, -2) and sys_language (-1 = ALL languages). This must be handled on both export and import.
-
                                $valArray[] = $relDat['table'].'_'.$relDat['id'];
                        } else {
-
                                $this->error('Lost relation: '.$relDat['table'].':'.$relDat['id'], 1);
                        }
                }
@@ -1477,9 +1503,15 @@ class tx_impexp {
                                        $this->alternativeFilePath[$tmpFile] = $this->dat['files'][$fI['ID']]['relFileRef'];
 
                                        return $tmpFile;
-                               } else $this->error('Error: temporary file '.$tmpFile.' had a size ('.filesize($tmpFile).') different from the original ('.$this->dat['files'][$fI['ID']]['filesize'].')', 1);
-                       } else $this->error('Error: temporary file '.$tmpFile.' was not written as it should have been!', 1);
-               } else $this->error('Error: No file found for ID '.$fI['ID'], 1);
+                               } else {
+                                       $this->error('Error: temporary file '.$tmpFile.' had a size ('.filesize($tmpFile).') different from the original ('.$this->dat['files'][$fI['ID']]['filesize'].')', 1);
+                               }
+                       } else {
+                               $this->error('Error: temporary file '.$tmpFile.' was not written as it should have been!', 1);
+                       }
+               } else {
+                       $this->error('Error: No file found for ID '.$fI['ID'], 1);
+               }
        }
 
        /**
@@ -1537,8 +1569,12 @@ class tx_impexp {
                                                        break;
                                                }
                                        }
-                               } else $this->error('Error: no record was found in data array!', 1);
-                       } else $this->error('Error: this records is NOT created it seems! ('.$table.':'.$uid.')', 1);
+                               } else {
+                                       $this->error('Error: no record was found in data array!', 1);
+                               }
+                       } else {
+                               $this->error('Error: this records is NOT created it seems! ('.$table.':'.$uid.')', 1);
+                       }
                }
                if (count($updateData)) {
                        $tce = $this->getNewTCE();
@@ -1833,21 +1869,31 @@ class tx_impexp {
 
                                                                // Return the relative path of the copy file name:
                                                        return substr($copyDestName, strlen(PATH_site));
-                                               } else $this->error('ERROR: Could not find original file ID');
-                                       } else $this->error('ERROR: The destination filenames "'.$copyDestName.'" and "'.$origDestName.'" either existed or have non-valid names');
-                               } else $this->error('ERROR: "'.PATH_site.$dirPrefix.'" was not a directory, so could not process file "'.$relFileName.'"');
-
-
-                       } elseif (t3lib_div::isFirstPartOfStr($dirPrefix, $this->fileadminFolderName.'/'))      {       // File in fileadmin/ folder:
+                                               } else {
+                                                       $this->error('ERROR: Could not find original file ID');
+                                               }
+                                       } else {
+                                               $this->error('ERROR: The destination filenames "'.$copyDestName.'" and "'.$origDestName.'" either existed or have non-valid names');
+                                       }
+                               } else {
+                                       $this->error('ERROR: "'.PATH_site.$dirPrefix.'" was not a directory, so could not process file "'.$relFileName.'"');
+                               }
+                       } elseif (t3lib_div::isFirstPartOfStr($dirPrefix, $this->fileadminFolderName.'/')) {    // File in fileadmin/ folder:
 
                                        // Create file (and possible resources)
                                $newFileName = $this->processSoftReferences_saveFile_createRelFile($dirPrefix, basename($relFileName), $cfg['file_ID'], $table, $uid);
 
                                if (strlen($newFileName)) {
                                        $relFileName = $newFileName;
-                               } else $this->error('ERROR: No new file created for "'.$relFileName.'"');
-                       } else $this->error('ERROR: Sorry, cannot operate on non-RTE files which are outside the fileadmin folder.');
-               } else $this->error('ERROR: Could not find file ID in header.');
+                               } else {
+                                       $this->error('ERROR: No new file created for "'.$relFileName.'"');
+                               }
+                       } else {
+                               $this->error('ERROR: Sorry, cannot operate on non-RTE files which are outside the fileadmin folder.');
+                       }
+               } else {
+                       $this->error('ERROR: Could not find file ID in header.');
+               }
 
                        // Return (new) filename relative to PATH_site:
                return $relFileName;
@@ -1908,8 +1954,12 @@ class tx_impexp {
                                                                        $destDir = substr(dirname($absResourceFileName).'/', strlen(PATH_site));
                                                                        if ($this->verifyFolderAccess($destDir, TRUE) && $this->checkOrCreateDir($destDir)) {
                                                                                $this->writeFileVerify($absResourceFileName, $res_fileID);
-                                                                       } else $this->error('ERROR: Could not create file in directory "'.$destDir.'"');
-                                                               } else $this->error('ERROR: Could not resolve path for "'.$relResourceFileName.'"');
+                                                                       } else {
+                                                                               $this->error('ERROR: Could not create file in directory "'.$destDir.'"');
+                                                                       }
+                                                               } else {
+                                                                       $this->error('ERROR: Could not resolve path for "'.$relResourceFileName.'"');
+                                                               }
 
                                                                $tokenizedContent = str_replace('{EXT_RES_ID:'.$res_fileID.'}', $relResourceFileName, $tokenizedContent);
                                                                $tokenSubstituted = TRUE;
@@ -1965,12 +2015,24 @@ class tx_impexp {
                                                        $this->fileIDMap[$fileID] = $fileName;
                                                        if (md5(t3lib_div::getUrl($fileName))==$this->dat['files'][$fileID]['content_md5']) {
                                                                return TRUE;
-                                                       } else $this->error('ERROR: File content "'.$fileName.'" was corrupted');
-                                               } else $this->error('ERROR: File ID "'.$fileID.'" could not be found');
-                                       } else $this->error('ERROR: Filename "'.$fileName.'" was not a valid relative file path!');
-                               } else $this->error('ERROR: Filename "'.$fileName.'" failed against extension check or deny-pattern!');
-                       } else $this->error('ERROR: Filename "'.$fileName.'" was not allowed in destination path!');
-               } else $this->error('ERROR: You did not have sufficient permissions to write the file "'.$fileName.'"');
+                                                       } else {
+                                                               $this->error('ERROR: File content "'.$fileName.'" was corrupted');
+                                                       }
+                                               } else {
+                                                       $this->error('ERROR: File ID "'.$fileID.'" could not be found');
+                                               }
+                                       } else {
+                                               $this->error('ERROR: Filename "'.$fileName.'" was not a valid relative file path!');
+                                       }
+                               } else {
+                                       $this->error('ERROR: Filename "'.$fileName.'" failed against extension check or deny-pattern!');
+                               }
+                       } else {
+                               $this->error('ERROR: Filename "'.$fileName.'" was not allowed in destination path!');
+                       }
+               } else {
+                       $this->error('ERROR: You did not have sufficient permissions to write the file "'.$fileName.'"');
+               }
        }
 
        /**
@@ -1988,7 +2050,7 @@ class tx_impexp {
                if ($firstDir === $this->fileadminFolderName && t3lib_div::getFileAbsFileName($dirPrefix)) {
 
                        $pathAcc = '';
-                       foreach($filePathParts as $dirname) {
+                       foreach ($filePathParts as $dirname) {
                                $pathAcc.='/'.$dirname;
                                if (strlen($dirname)) {
                                        if (!@is_dir(PATH_site.$this->fileadminFolderName.$pathAcc)) {
@@ -1997,9 +2059,11 @@ class tx_impexp {
                                                        return FALSE;
                                                }
                                        }
-                               } elseif ($dirPrefix===$this->fileadminFolderName.$pathAcc) {
+                               } elseif ($dirPrefix === $this->fileadminFolderName . $pathAcc) {
                                        return TRUE;
-                               } else $this->error('ERROR: Directory could not be created....A');
+                               } else {
+                                       $this->error('ERROR: Directory could not be created....A');
+                               }
                        }
                }
        }
@@ -2063,9 +2127,15 @@ class tx_impexp {
                                                if ($this->dat['_DOCUMENT_TAG']==='T3RecordDocument' && is_array($this->dat['header']) && is_array($this->dat['records'])) {
                                                        $this->loadInit();
                                                        return TRUE;
-                                               } else $this->error('XML file did not contain proper XML for TYPO3 Import');
-                                       } else $this->error('XML could not be parsed: '.$this->dat);
-                               } else $this->error('Error opening file: '.$filename);
+                                               } else {
+                                                       $this->error('XML file did not contain proper XML for TYPO3 Import');
+                                               }
+                                       } else {
+                                               $this->error('XML could not be parsed: '.$this->dat);
+                                       }
+                               } else {
+                                       $this->error('Error opening file: '.$filename);
+                               }
                        } else {
                                        // T3D
                                if($fd = fopen($filename, 'rb')) {
@@ -2076,10 +2146,14 @@ class tx_impexp {
                                        }
                                        $this->loadInit();
                                        return TRUE;
-                               } else $this->error('Error opening file: '.$filename);
+                               } else {
+                                       $this->error('Error opening file: '.$filename);
+                               }
                                fclose($fd);
                        }
-               } else $this->error('Filename not found: '.$filename);
+               } else {
+                       $this->error('Filename not found: '.$filename);
+               }
 
                return FALSE;
        }
@@ -2108,12 +2182,20 @@ class tx_impexp {
                                        if ($initStrDat[1]) {
                                                if ($this->compress) {
                                                        $datString = gzuncompress($datString);
-                                               } else $this->error('Content read error: This file requires decompression, but this server does not offer gzcompress()/gzuncompress() functions.', 1);
+                                               } else {
+                                                       $this->error('Content read error: This file requires decompression, but this server does not offer gzcompress()/gzuncompress() functions.', 1);
+                                               }
                                        }
                                        return $unserialize ? unserialize($datString) : $datString;
-                               } else $this->error('MD5 check failed ('.$name.')');
-                       } else $this->error('File read error: InitString had a wrong length. ('.$name.')');
-               } else $this->error('File read error: Warning message in file. ('.$initStr.fgets($fd).')');
+                               } else {
+                                       $this->error('MD5 check failed ('.$name.')');
+                               }
+                       } else {
+                               $this->error('File read error: InitString had a wrong length. ('.$name.')');
+                       }
+               } else {
+                       $this->error('File read error: Warning message in file. ('.$initStr.fgets($fd).')');
+               }
        }
 
        /**
@@ -2154,11 +2236,17 @@ class tx_impexp {
                                if ($initStrDat[1]) {
                                        if ($this->compress) {
                                                $datString = gzuncompress($datString);
-                                       } else $this->error('Content read error: This file requires decompression, but this server does not offer gzcompress()/gzuncompress() functions.', 1);
+                                       } else {
+                                               $this->error('Content read error: This file requires decompression, but this server does not offer gzcompress()/gzuncompress() functions.', 1);
+                                       }
                                }
                                return $unserialize ? unserialize($datString) : $datString;
-                       } else $this->error('MD5 check failed ('.$name.')');
-               } else $this->error('Content read error: InitString had a wrong length. ('.$name.')');
+                       } else {
+                               $this->error('MD5 check failed ('.$name.')');
+                       }
+               } else {
+                       $this->error('Content read error: InitString had a wrong length. ('.$name.')');
+               }
        }
 
        /**
@@ -2410,7 +2498,9 @@ class tx_impexp {
                        // Get record:
                $record = $this->dat['header']['records'][$table][$uid];
                unset($this->remainHeader['records'][$table][$uid]);
-               if (!is_array($record) && !($table==='pages' && !$uid)) $this->error('MISSING RECORD: '.$table.':'.$uid, 1);
+               if (!is_array($record) && !($table === 'pages' && !$uid)) {
+                       $this->error('MISSING RECORD: '.$table.':'.$uid, 1);
+               }
 
                        // Begin to create the line arrays information record, pInfo:
                $pInfo = array();
@@ -2463,7 +2553,9 @@ class tx_impexp {
                                                // Mode selector:
                                        $optValues = array();
                                        $optValues[] = $recInf ? $LANG->getLL('impexpcore_singlereco_update') : $LANG->getLL('impexpcore_singlereco_insert');
-                                       if ($recInf) $optValues['as_new'] = $LANG->getLL('impexpcore_singlereco_importAsNew');
+                                       if ($recInf) {
+                                               $optValues['as_new'] = $LANG->getLL('impexpcore_singlereco_importAsNew');
+                                       }
                                        if ($recInf) {
                                                if (!$this->global_ignore_pid) {
                                                        $optValues['ignore_pid'] = $LANG->getLL('impexpcore_singlereco_ignorePid');
@@ -2471,7 +2563,9 @@ class tx_impexp {
                                                        $optValues['respect_pid'] = $LANG->getLL('impexpcore_singlereco_respectPid');
                                                }
                                        }
-                                       if (!$recInf && $GLOBALS['BE_USER']->isAdmin()) $optValues['force_uid'] = sprintf($LANG->getLL('impexpcore_singlereco_forceUidSAdmin'), $uid);
+                                       if (!$recInf && $GLOBALS['BE_USER']->isAdmin()) {
+                                               $optValues['force_uid'] = sprintf($LANG->getLL('impexpcore_singlereco_forceUidSAdmin'), $uid);
+                                       }
                                        $optValues['exclude'] = $LANG->getLL('impexpcore_singlereco_exclude');
 
                                        $pInfo['updateMode'] = $this->renderSelectBox('tx_impexp[import_mode][' . $table . ':' . $uid . ']', $this->import_mode[$table . ':' . $uid], $optValues);
@@ -2620,7 +2714,9 @@ class tx_impexp {
                                                $this->addRelations($record['rels'], $lines, $preCode.'&nbsp;&nbsp;', array_merge($recurCheck, array($pInfo['ref'])), $htmlColorClass);
                                        }
                                }
-                       } else $this->error($pInfo['ref'].' was recursive...');
+                       } else {
+                               $this->error($pInfo['ref'].' was recursive...');
+                       }
                }
        }
 
@@ -2690,7 +2786,9 @@ class tx_impexp {
                                        if (!$this->allowPHPScripts && !$fileProcObj->checkIfAllowed($testFI['fileext'], $testFI['path'], $testFI['file'])) {
                                                $pInfo['msg'].= 'File extension was not allowed!';
                                        }
-                               } else $pInfo['msg'] = 'You user profile does not allow you to create files on the server!';
+                               } else {
+                                       $pInfo['msg'] = 'You user profile does not allow you to create files on the server!';
+                               }
                        }
 
                        $pInfo['showDiffContent'] = substr($this->fileIDMap[$ID], strlen(PATH_site));
@@ -2845,7 +2943,9 @@ class tx_impexp {
                                        // Default Value:
                                $descriptionField.= '<input type="hidden" name="tx_impexp[softrefCfg]['.$cfg['subst']['tokenID'].'][defValue]" value="'.htmlspecialchars($cfg['subst']['tokenValue']).'" />';
 
-                       } else $descriptionField = '';
+                       } else {
+                               $descriptionField = '';
+                       }
 
                        return $selectorbox.$descriptionField;
                }
@@ -2968,7 +3068,9 @@ class tx_impexp {
                $isSelFlag = 0;
                foreach ($optValues as $k => $v) {
                        $sel = (!strcmp($k, $value) ? ' selected="selected"' : '');
-                       if ($sel)       $isSelFlag++;
+                       if ($sel) {
+                               $isSelFlag++;
+                       }
                        $opt[] = '<option value="'.htmlspecialchars($k).'"'.$sel.'>'.htmlspecialchars($v).'</option>';
                }
                if (!$isSelFlag && strcmp('', $value)) {
@@ -3023,7 +3125,7 @@ class tx_impexp {
                                // Create output:
                        if (count($output)) {
                                $tRows = array();
-                               foreach($output as $fN => $state) {
+                               foreach ($output as $fN => $state) {
                                        $tRows[] = '
                                                <tr>
                                                        <td class="bgColor5">' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$fN]['label'], 1 ) .
index 1e88aec..ff8f073 100644 (file)
@@ -1378,8 +1378,12 @@ class Tx_IndexedSearch_Controller_SearchController extends Tx_Extbase_MVC_Contro
                $urlParameters = (array) unserialize($row['cHashParams']);
 
                        // Add &type and &MP variable:
-               if ($row['data_page_mp']) $urlParameters['MP'] = $row['data_page_mp'];
-               if ($row['sys_language_uid']) $urlParameters['L'] = $row['sys_language_uid'];
+               if ($row['data_page_mp']) {
+                       $urlParameters['MP'] = $row['data_page_mp'];
+               }
+               if ($row['sys_language_uid']) {
+                       $urlParameters['L'] = $row['sys_language_uid'];
+               }
 
                        // markup-GET vars:
                $urlParameters = array_merge($urlParameters, $markUpSwParams);
index 316b7fe..b8c2dcb 100755 (executable)
@@ -104,8 +104,12 @@ class tx_indexed_search_extparse {
                                                        // PDF mode:
                                                $this->pdf_mode = t3lib_utility_Math::forceIntegerInRange($indexerConfig['pdf_mode'], -100, 100);
                                                $extOK = TRUE;
-                                       } else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsNotFound'), $pdfPath), 3);
-                               } else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsDisabled'), 1);
+                                       } else {
+                                               $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsNotFound'), $pdfPath), 3);
+                                       }
+                               } else {
+                                       $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsDisabled'), 1);
+                               }
                        break;
                        case 'doc':
                                        // Catdoc
@@ -114,8 +118,12 @@ class tx_indexed_search_extparse {
                                        if (@is_file($catdocPath . 'catdoc' . $exe)) {
                                                $this->app['catdoc'] = $catdocPath.'catdoc'.$exe;
                                                $extOK = TRUE;
-                                       } else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocNotFound'), $catdocPath), 3);
-                               } else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocDisabled'), 1);
+                                       } else {
+                                               $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocNotFound'), $catdocPath), 3);
+                                       }
+                               } else {
+                                       $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocDisabled'), 1);
+                               }
                        break;
                        case 'pps':             // MS PowerPoint(?)
                        case 'ppt':             // MS PowerPoint
@@ -125,8 +133,12 @@ class tx_indexed_search_extparse {
                                        if (@is_file($ppthtmlPath . 'ppthtml' . $exe)) {
                                                $this->app['ppthtml'] = $ppthtmlPath.'ppthtml'.$exe;
                                                $extOK = TRUE;
-                                       } else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlNotFound'), $ppthtmlPath), 3);
-                               } else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlDisabled'), 1);
+                                       } else {
+                                               $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlNotFound'), $ppthtmlPath), 3);
+                                       }
+                               } else {
+                                       $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlDisabled'), 1);
+                               }
                        break;
                        case 'xls':             // MS Excel
                                        // Xlhtml
@@ -135,8 +147,12 @@ class tx_indexed_search_extparse {
                                        if (@is_file($xlhtmlPath . 'xlhtml' . $exe)) {
                                                $this->app['xlhtml'] = $xlhtmlPath.'xlhtml'.$exe;
                                                $extOK = TRUE;
-                                       } else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlNotFound'), $xlhtmlPath), 3);
-                               } else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlDisabled'), 1);
+                                       } else {
+                                               $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlNotFound'), $xlhtmlPath), 3);
+                                       }
+                               } else {
+                                       $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlDisabled'), 1);
+                               }
                        break;
                        case 'sxc':             // Open Office Calc.
                        case 'sxi':             // Open Office Impress
@@ -149,8 +165,12 @@ class tx_indexed_search_extparse {
                                        if (@is_file($unzipPath . 'unzip' . $exe)) {
                                                $this->app['unzip'] = $unzipPath.'unzip'.$exe;
                                                $extOK = TRUE;
-                                       } else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipNotFound'), $unzipPath), 3);
-                               } else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipDisabled'), 1);
+                                       } else {
+                                               $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipNotFound'), $unzipPath), 3);
+                                       }
+                               } else {
+                                       $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipDisabled'), 1);
+                               }
                        break;
                        case 'rtf':
                                        // Catdoc
@@ -378,7 +398,9 @@ class tx_indexed_search_extparse {
                unset($contentArr);
 
                        // Return immediately if initialization didn't set support up:
-               if (!$this->supportedExtensions[$ext])  return FALSE;
+               if (!$this->supportedExtensions[$ext]) {
+                       return FALSE;
+               }
 
                        // Switch by file extension
                switch ($ext) {
@@ -642,8 +664,12 @@ class tx_indexed_search_extparse {
         * @return      string          Relative file reference, resolvable by t3lib_div::getFileAbsFileName()
         */
        function getIcon($extension) {
-               if ($extension=='htm')  $extension = 'html';
-               if ($extension=='jpeg') $extension = 'jpg';
+               if ($extension=='htm') {
+                       $extension = 'html';
+               }
+               if ($extension=='jpeg') {
+                       $extension = 'jpg';
+               }
                return 'EXT:indexed_search/pi/res/'.$extension.'.gif';
        }
 }
index 7ebf53f..f078068 100755 (executable)
@@ -193,10 +193,18 @@ class tx_indexedsearch_indexer {
                                                                // Init and start indexing:
                                                        $this->init();
                                                        $this->indexTypo3PageContent();
-                                               } else $this->log_setTSlogMessage('Index page? No, ->sys_language_uid was different from sys_language_content which indicates that the page contains fall-back content and that would be falsely indexed as localized content.');
-                                       } else $this->log_setTSlogMessage('Index page? No, page was set to "no_cache" and so cannot be indexed.');
-                               } else $this->log_setTSlogMessage('Index page? No, The "No Search" flag has been set in the page properties!');
-                       } else $this->log_setTSlogMessage('Index page? No, Ordinary Frontend indexing during rendering is disabled.');
+                                               } else {
+                                                       $this->log_setTSlogMessage('Index page? No, ->sys_language_uid was different from sys_language_content which indicates that the page contains fall-back content and that would be falsely indexed as localized content.');
+                                               }
+                                       } else {
+                                               $this->log_setTSlogMessage('Index page? No, page was set to "no_cache" and so cannot be indexed.');
+                                       }
+                               } else {
+                                       $this->log_setTSlogMessage('Index page? No, The "No Search" flag has been set in the page properties!');
+                               }
+                       } else {
+                               $this->log_setTSlogMessage('Index page? No, Ordinary Frontend indexing during rendering is disabled.');
+                       }
                        $this->log_pull();
                }
        }
@@ -341,7 +349,10 @@ class tx_indexedsearch_indexer {
                        // Initializing:
                $this->cHashParams = $this->conf['cHash_array'];
                if (is_array($this->cHashParams) && count($this->cHashParams)) {
-                       if ($this->conf['cHash'])       $this->cHashParams['cHash'] = $this->conf['cHash'];     // Add this so that URL's come out right...
+                       if ($this->conf['cHash']) {
+                                       // Add this so that URL's come out right...
+                               $this->cHashParams['cHash'] = $this->conf['cHash'];
+                       }
                        unset($this->cHashParams['encryptionKey']);             // encryptionKey is added inside TSFE in order to calculate the cHash value and it should NOT be a part of this array!!! If it is it will be exposed in links!!!
                }
 
@@ -561,7 +572,7 @@ class tx_indexedsearch_indexer {
 
                        // Get rid of unwanted sections (ie. scripting and style stuff) in body
                $tagList = explode(',', $this->excludeSections);
-               foreach($tagList as $tag) {
+               foreach ($tagList as $tag) {
                        while($this->embracingTags($contentArr['body'], $tag, $dummy, $contentArr['body'], $dummy2));
                }
 
@@ -632,7 +643,9 @@ class tx_indexedsearch_indexer {
                        // stristr used because we want a case-insensitive search for the tag.
                $isTagInText = stristr($string, $startTag);
                        // if the tag was not found, return FALSE
-               if(!$isTagInText) return FALSE;
+               if(!$isTagInText) {
+                       return FALSE;
+               }
 
                list($paramList, $isTagInText) = explode('>', substr($isTagInText, strlen($startTag)), 2);
                $afterTagInText = stristr($isTagInText, $endTag);
@@ -1142,16 +1155,26 @@ class tx_indexedsearch_indexer {
                                                                        $this->updateTstamp($phash_arr['phash'], $mtime);
                                                                        $this->log_setTSlogMessage('Indexing not needed, the contentHash, ' . $content_md5h . ', has not changed. Timestamp updated.');
                                                                }
-                                                       } else $this->log_setTSlogMessage('Could not index file! Unsupported extension.');
-                                               } else $this->log_setTSlogMessage('The limit of '.$this->maxExternalFiles.' has already been exceeded, so no indexing will take place this time.');
-                                       } else $this->log_setTSlogMessage('Indexing not needed, reason: '.$this->reasons[$check]);
+                                                       } else {
+                                                               $this->log_setTSlogMessage('Could not index file! Unsupported extension.');
+                                                       }
+                                               } else {
+                                                       $this->log_setTSlogMessage('The limit of '.$this->maxExternalFiles.' has already been exceeded, so no indexing will take place this time.');
+                                               }
+                                       } else {
+                                               $this->log_setTSlogMessage('Indexing not needed, reason: '.$this->reasons[$check]);
+                                       }
 
                                                // Checking and setting sections:
                                        $this->submitFile_section($phash_arr['phash']);         // Setting a section-record for the file. This is done also if the file is not indexed. Notice that section records are deleted when the page is indexed.
                                        $this->log_pull();
                                }
-                       } else $this->log_setTSlogMessage('Indexing not possible; The extension "'.$ext.'" was not supported.');
-               } else $this->log_setTSlogMessage('Indexing not possible; File "'.$absFile.'" not found or valid.');
+                       } else {
+                               $this->log_setTSlogMessage('Indexing not possible; The extension "'.$ext.'" was not supported.');
+                       }
+               } else {
+                       $this->log_setTSlogMessage('Indexing not possible; File "'.$absFile.'" not found or valid.');
+               }
        }
 
        /**
@@ -2165,7 +2188,9 @@ class tx_indexedsearch_indexer {
         * @return      void
         */
        function log_pull() {
-               if (is_object($GLOBALS['TT']))          $GLOBALS['TT']->pull();
+               if (is_object($GLOBALS['TT'])) {
+                       $GLOBALS['TT']->pull();
+               }
        }
 
        /**
index 10f6719..bd8135e 100755 (executable)
@@ -128,7 +128,9 @@ class tx_indexedsearch_lexer {
                                }
 
                                $pos = $start+$len;
-                       } else break;
+                       } else {
+                               break;
+                       }
                }
                return $words;
        }
@@ -233,7 +235,10 @@ class tx_indexedsearch_lexer {
 
                        // If the return value was FALSE it means a sequence of non-word chars were found (or blank string) - so we will start another search for the word:
                $pos += $len;
-               if ($str{$pos} == '')   return FALSE;   // check end of string before looking for word of course.
+               if ($str{$pos} == '') {
+                               // Check end of string before looking for word of course.
+                       return FALSE;
+               }
 
                $this->utf8_is_letter($str, $len, $pos);
                return array($pos, $len);
@@ -255,7 +260,10 @@ class tx_indexedsearch_lexer {
                $cType = $cType_prev = FALSE; // Letter type
                $letter = TRUE; // looking for a letter?
 
-               if ($str{$pos} == '')   return FALSE;   // Return FALSE on end-of-string at this stage
+               if ($str{$pos} == '') {
+                               // Return FALSE on end-of-string at this stage
+                       return FALSE;
+               }
 
                while(1) {
 
@@ -273,19 +281,23 @@ class tx_indexedsearch_lexer {
                                                        }
                                                        return TRUE;
                                                } else {        // If a printJoin char is found, record the length if it has not been recorded already:
-                                                       if (!$printJoinLgd)     $printJoinLgd = $len;
+                                                       if (!$printJoinLgd) {
+                                                               $printJoinLgd = $len;
+                                                       }
                                                }
                                        } else {        // When a true letter is found, reset printJoinLgd counter:
                                                $printJoinLgd = 0;
                                        }
-                               }
-                               elseif (!$letter && $cType)     {       // end of non-word reached
+                               } elseif (!$letter && $cType) { // end of non-word reached
                                        return FALSE;
                                }
                        }
                        $len += $bc;    // add byte-length of last found character
 
-                       if ($str{$pos} == '')   return $letter; // end of string; return status of string till now
+                       if ($str{$pos} == '') {
+                                       // End of string; return status of string till now
+                               return $letter;
+                       }
 
                                // Get next chars unicode number:
                        $cp = $this->utf8_ord($str, $bc, $pos);
@@ -299,7 +311,9 @@ class tx_indexedsearch_lexer {
                        }
 
                                // Setting letter to FALSE if the first char was not a letter!
-                       if (!$len)      $letter = FALSE;
+                       if (!$len) {
+                               $letter = FALSE;
+                       }
                }
 
                return FALSE;
@@ -372,8 +386,10 @@ class tx_indexedsearch_lexer {
                        $len += $bc;
 
                        $ord = $ord & ((1 << (6-$bc)) - 1);     // mask utf-8 lead-in bytes
-                       for ($i=$pos+1; $bc; $bc--, $i++)       // "bring in" data bytes
+                               // "bring in" data bytes
+                       for ($i = $pos + 1; $bc; $bc--, $i++) {
                                $ord = ($ord << 6) | (ord($str{$i}) & 0x3F);
+                       }
                }
 
                return $hex ? 'x'.dechex($ord) : $ord;
index 19861db..341f08b 100755 (executable)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 t3lib_extMgm::addPItoST43($_EXTKEY);
 
index 7d1bb4a..746cd90 100755 (executable)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.php:mod_indexed_search', $_EXTKEY));
 
index 987e7b4..2f9a849 100755 (executable)
@@ -89,7 +89,9 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                global $LANG,$TYPO3_CONF_VARS;
 
                        // Return if no page id:
-               if ($this->pObj->id<=0)         return;
+               if ($this->pObj->id <= 0) {
+                       return;
+               }
 
                        // Indexer configuration from Extension Manager interface:
                $this->indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
@@ -347,7 +349,9 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                if ($row['item_type']) {
                        $arr = unserialize($row['cHashParams']);
                        $page = $arr['key'] ? ' ['.$arr['key'].']' : '';
-               } else $page = '';
+               } else {
+                       $page = '';
+               }
                $elTitle = $this->linkDetails($row['item_title'] ? htmlspecialchars(t3lib_div::fixed_lgd_cs($this->utf8_to_currentCharset($row['item_title']), 20).$page) : '<em>[No Title]</em>', $row['phash']);
                $cmdLinks = $this->printRemoveIndexed($row['phash'], 'Clear phash-row').$this->printReindex($row, 'Re-index element');
 
@@ -679,7 +683,9 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                                // Add go-back link:
                        $content = $this->linkList().$content.$this->linkList();
 
-               } else $content.= 'Error: No phash row found';
+               } else {
+                       $content .= 'Error: No phash row found';
+               }
 
                return $content;
        }
index f9609f8..f5b1d0f 100755 (executable)
@@ -156,10 +156,14 @@ class tx_indexedsearch extends tslib_pibase {
                $this->lexerObj = t3lib_div::getUserObj($lexerObjRef);
 
                        // If "_sections" is set, this value overrides any existing value.
-               if ($this->piVars['_sections'])         $this->piVars['sections'] = $this->piVars['_sections'];
+               if ($this->piVars['_sections']) {
+                       $this->piVars['sections'] = $this->piVars['_sections'];
+               }
 
                        // If "_sections" is set, this value overrides any existing value.
-               if ($this->piVars['_freeIndexUid']!=='_')               $this->piVars['freeIndexUid'] = $this->piVars['_freeIndexUid'];
+               if ($this->piVars['_freeIndexUid'] !== '_') {
+                       $this->piVars['freeIndexUid'] = $this->piVars['_freeIndexUid'];
+               }
 
                        // Add previous search words to current
                if ($this->piVars['sword_prev_include'] && $this->piVars['sword_prev']) {
@@ -284,11 +288,15 @@ class tx_indexedsearch extends tslib_pibase {
                                                foreach ($secondLevelMenu as $kk2 => $mR2) {
                                                        if (!$mR2['nav_hide']) {
                                                                $this->optValues['sections']['rl2_'.$mR2['uid']] = trim($this->pi_getLL('opt_RL2').' '.$mR2['title']);
-                                                       } else unset($secondLevelMenu[$kk2]);
+                                                       } else {
+                                                               unset($secondLevelMenu[$kk2]);
+                                                       }
                                                }
                                                $this->optValues['sections']['rl2_'.implode(',', array_keys($secondLevelMenu))] = $this->pi_getLL('opt_RL2ALL');
                                        }
-                               } else unset($firstLevelMenu[$optionName]);
+                               } else {
+                                       unset($firstLevelMenu[$optionName]);
+                               }
                        }
                        $this->optValues['sections']['rl1_'.implode(',', array_keys($firstLevelMenu))] = $this->pi_getLL('opt_RL1ALL');
                }
@@ -702,7 +710,9 @@ class tx_indexedsearch extends tslib_pibase {
                                                // Insert new:
                                        $newResultRows[$id] = $row;
                                        $newResultRows[$id]['_sub'] = $subrows;
-                               } else $newResultRows[$id]['_sub'][] = $row;
+                               } else {
+                                       $newResultRows[$id]['_sub'][] = $row;
+                               }
                        } else {
                                $newResultRows[$id] = $row;
                        }
@@ -729,7 +739,9 @@ class tx_indexedsearch extends tslib_pibase {
                                                $theRLid = $rlParts[2] ? 'rl2_'.$rlParts[2]:($rlParts[1]?'rl1_'.$rlParts[1]:'0');
 
                                                $sectionName = $this->getPathFromPageId($theId);
-                                               if ($sectionName{0} == '/') $sectionName = substr($sectionName, 1);
+                                               if ($sectionName{0} == '/') {
+                                                       $sectionName = substr($sectionName, 1);
+                                               }
 
                                                if (!trim($sectionName)) {
                                                        $sectionTitleLinked = $this->pi_getLL('unnamedSection', '', 1).':';
@@ -797,7 +809,10 @@ class tx_indexedsearch extends tslib_pibase {
                                // Making the query for a single search word based on the search-type
                        $sWord = $v['sword'];
                        $theType = (string)$this->piVars['type'];
-                       if (strstr($sWord, ' '))        $theType = 20;  // If there are spaces in the search-word, make a full text search instead.
+                       if (strstr($sWord, ' ')) {
+                                       // If there are spaces in the search-word, make a full text search instead.
+                               $theType = 20;
+                       }
 
                        $GLOBALS['TT']->push('SearchWord "'.$sWord.'" - $theType='.$theType);
 
@@ -1026,7 +1041,7 @@ class tx_indexedsearch extends tslib_pibase {
         * @return      string          AND statement for selection of langauge
         */
        function languageWhere() {
-               if ($this->piVars['lang']>=0)   {       // -1 is the same as ALL language.
+               if ($this->piVars['lang']>=0) { // -1 is the same as ALL language.
                        return 'AND IP.sys_language_uid='.intval($this->piVars['lang']);
                }
        }
@@ -1051,7 +1066,9 @@ class tx_indexedsearch extends tslib_pibase {
                                        switch ($table) {
                                                case 'index_config':
                                                        $idxRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', 'index_config', 'uid=' . intval($uid) . $this->cObj->enableFields('index_config'));
-                                                       if ($idxRec)    $list[] = $uid;
+                                                       if ($idxRec) {
+                                                               $list[] = $uid;
+                                                       }
                                                break;
                                                case 'pages':
                                                        $indexCfgRecordsFromPid = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'index_config', 'pid='.intval($uid).$this->cObj->enableFields('index_config'));
@@ -1261,7 +1278,9 @@ class tx_indexedsearch extends tslib_pibase {
         */
        function isDescending($inverse=FALSE) {
                $desc = $this->piVars['desc'];
-               if ($inverse)   $desc=!$desc;
+               if ($inverse) {
+                       $desc =! $desc;
+               }
                return !$desc ? ' DESC':'';
        }
 
@@ -1830,7 +1849,9 @@ class tx_indexedsearch extends tslib_pibase {
 
                        foreach ($optValues as $k => $v) {
                                $sel = (!strcmp($k, $value) ? ' selected="selected"' : '');
-                               if ($sel)       $isSelFlag++;
+                               if ($sel) {
+                                       $isSelFlag++;
+                               }
                                $opt[] = '<option value="'.htmlspecialchars($k).'"'.$sel.'>'.htmlspecialchars($v).'</option>';
                        }
 
@@ -2079,7 +2100,9 @@ class tx_indexedsearch extends tslib_pibase {
                        $pp = explode('-', $dat['key']);
                        if ($pp[0]!=$pp[1]) {
                                $add=', '.$this->pi_getLL('word_pages').' '.$dat['key'];
-                       } else $add=', '.$this->pi_getLL('word_page').' '.$pp[0];
+                       } else {
+                               $add = ', '.$this->pi_getLL('word_page').' '.$pp[0];
+                       }
                }
 
                $outputString = $GLOBALS['TSFE']->csConvObj->crop('utf-8', $row['item_title'], 50, '...');
@@ -2215,9 +2238,15 @@ class tx_indexedsearch extends tslib_pibase {
                $urlParameters = (array)unserialize($row['cHashParams']);
 
                        // Add &type and &MP variable:
-               if ($row['data_page_type']) $urlParameters['type'] = $row['data_page_type'];
-               if ($row['data_page_mp']) $urlParameters['MP'] = $row['data_page_mp'];
-               if ($row['sys_language_uid']) $urlParameters['L'] = $row['sys_language_uid'];
+               if ($row['data_page_type']) {
+                       $urlParameters['type'] = $row['data_page_type'];
+               }
+               if ($row['data_page_mp']) {
+                       $urlParameters['MP'] = $row['data_page_mp'];
+               }
+               if ($row['sys_language_uid']) {
+                       $urlParameters['L'] = $row['sys_language_uid'];
+               }
 
                        // markup-GET vars:
                $urlParameters = array_merge($urlParameters, $markUpSwParams);
index 3fb5603..8db8bab 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))     die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 $TCA['index_config'] = Array (
        'ctrl' => $TCA['index_config']['ctrl'],
index 0f067a0..f4a7226 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
        // Configure hook to query the fulltext index
 $TYPO3_CONF_VARS['EXTCONF']['indexed_search']['pi1_hooks']['getResultRows_SQLpointer'] = 'EXT:indexed_search_mysql/class.tx_indexedsearch_mysql.php:&tx_indexedsearch_mysql';
index 6f95525..f7062a9 100755 (executable)
@@ -134,7 +134,9 @@ class tx_infopagetsconfig_webinfo extends t3lib_extobjbase {
                                                        t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                        '<strong>'.$GLOBALS['LANG']->getLL('editTSconfig_all', 1).'</strong>'.
                                                '</a>';
-                       } else $editIcon = '';
+                       } else {
+                               $editIcon = '';
+                       }
 
                        $theOutput .= $this->pObj->doc->section('',
                                t3lib_BEfunc::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'tsconfig_edit', $GLOBALS['BACK_PATH'], '|<br />') .