[TASK] CGL FunctionCallArgumentSpacingNoSpaceAfterComma in /typo3/
authorRoland Waldner <most.wanted@gmx.at>
Tue, 12 Jun 2012 18:51:06 +0000 (20:51 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 14 Jun 2012 21:54:28 +0000 (23:54 +0200)
Change-Id: Id806a15491fabd2c61dc0ced44a3ca2adeeb89fb
Resolves: #37974
Releases: 6.0
Reviewed-on: http://review.typo3.org/12003
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/class.crawler.php
typo3/sysext/indexed_search/mod/index.php
typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php

index 9cc43f4..1e88aec 100644 (file)
@@ -731,15 +731,15 @@ class Tx_IndexedSearch_Controller_SearchController extends Tx_Extbase_MVC_Contro
        protected function markupSWpartsOfString($str) {
 
                        // Init:
-               $str = str_replace('&nbsp;',' ',t3lib_parsehtml::bidir_htmlspecialchars($str,-1));
-               $str = preg_replace('/\s\s+/',' ',$str);
+               $str = str_replace('&nbsp;', ' ', t3lib_parsehtml::bidir_htmlspecialchars($str, -1));
+               $str = preg_replace('/\s\s+/', ' ', $str);
                $swForReg = array();
 
                        // Prepare search words for regex:
                foreach ($this->sWArr as $d) {
-                       $swForReg[] = preg_quote($d['sword'],'/');
+                       $swForReg[] = preg_quote($d['sword'], '/');
                }
-               $regExString = '('.implode('|',$swForReg).')';
+               $regExString = '(' . implode('|', $swForReg) . ')';
 
                        // Split and combine:
                $parts = preg_split('/'.$regExString.'/i', ' '.$str.' ', 20000, PREG_SPLIT_DELIM_CAPTURE);
@@ -773,13 +773,14 @@ class Tx_IndexedSearch_Controller_SearchController extends Tx_Extbase_MVC_Contro
                                        }
                                } elseif ($summaryLgd > $summaryMax || !isset($parts[$k+1])) {  // In case summary length is exceed OR if there are no more entries at all:
                                        if ($strLen > $postPreLgd) {
-                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) . $divider;
+                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) . $divider;
                                        }
-                               } else {        // In-between search words:
+                                       // In-between search words:
+                               } else {
                                        if ($strLen > $postPreLgd * 2) {
-                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)).
-                                                                               $divider.
-                                                                               preg_replace('/^[^[:space:]]+[[:space:]]/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], -($postPreLgd - $postPreLgd_offset)));
+                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) .
+                                                       $divider .
+                                                       preg_replace('/^[^[:space:]]+[[:space:]]/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], -($postPreLgd - $postPreLgd_offset)));
                                        }
                                }
                                $summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8', $output[$k]);
@@ -894,9 +895,9 @@ class Tx_IndexedSearch_Controller_SearchController extends Tx_Extbase_MVC_Contro
                                        array('-', 'AND NOT'),
                                                // Add operators for various languages
                                                // Converts the operators to UTF-8 and lowercase
-                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandAnd', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND'),
-                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandOr', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'OR'),
-                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8',$GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandNot', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND NOT'),
+                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandAnd', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND'),
+                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandOr', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'OR'),
+                                       array($GLOBALS['TSFE']->csConvObj->conv_case('utf-8', $GLOBALS['TSFE']->csConvObj->utf8_encode(Tx_Extbase_Utility_Localization::translate('localizedOperandNot', 'indexed_search'), $GLOBALS['TSFE']->renderCharset), 'toLower'), 'AND NOT'),
                                );
 
                                $search = t3lib_div::makeInstance('tslib_search');
index 0c0d537..051a781 100644 (file)
@@ -295,7 +295,7 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository {
                        $sWord = $v['sword'];
                        $theType = (string) $this->searchType;
                                // If there are spaces in the search-word, make a full text search instead.
-                       if (strstr($sWord,' ')) {
+                       if (strstr($sWord, ' ')) {
                                $theType = 20;
                        }
 
@@ -424,7 +424,7 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository {
                $wildcard_right = ($mode & WILDCARD_RIGHT) ? '%' : '';
 
                $wSel = 'IW.baseword LIKE \'' . $wildcard_left . $GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words') . $wildcard_right . '\'';
-               $res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
+               $res = $this->execPHashListQuery($wSel, ' AND is_stopword=0');
                return $res;
        }
 
index 7f88b49..6480947 100755 (executable)
@@ -118,7 +118,7 @@ class tx_indexedsearch_crawler {
                                                'depth' => 0    // Specific for URL and file types
                                        );
 
-                                       $pObj->addQueueEntry_callBack($setId,$params,$this->callBack,$cfgRec['pid']);
+                                       $pObj->addQueueEntry_callBack($setId, $params, $this->callBack, $cfgRec['pid']);
                                break;
                                case 3: // External URL:
 
index 9a1391d..fb8e367 100755 (executable)
@@ -179,7 +179,7 @@ class SC_mod_tools_isearch_index {
 
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('','function',$this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
                }
                return $buttons;
        }
index 99b470c..987e7b4 100755 (executable)
@@ -132,9 +132,9 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                $this->indexerObj = t3lib_div::makeInstance('tx_indexedsearch_indexer');
 
                        // Set CSS styles specific for this document:
-               $this->pObj->content = str_replace('/*###POSTCSSMARKER###*/','
+               $this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
                        TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
-               ',$this->pObj->content);
+               ', $this->pObj->content);
 
 
                        // Check if details for a phash record should be shown:
index 3466896..f9609f8 100755 (executable)
@@ -963,7 +963,7 @@ class tx_indexedsearch extends tslib_pibase {
                        $out.= ' AND ISEC.rl1 IN (' . $list . ')';
                        $match = TRUE;
                } elseif (substr($this->piVars['sections'], 0, 4)=='rl2_') {
-                       $list = implode(',',t3lib_div::intExplode(',', substr($this->piVars['sections'], 4)));
+                       $list = implode(',', t3lib_div::intExplode(',', substr($this->piVars['sections'], 4)));
                        $out.= ' AND ISEC.rl2 IN (' . $list . ')';
                        $match = TRUE;
                } elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['addRootLineFields'])) {
@@ -1736,7 +1736,7 @@ class tx_indexedsearch extends tslib_pibase {
                        } else {        // Suspicious, so linking to page instead...
                                $copy_row = $row;
                                unset($copy_row['cHashParams']);
-                               $title = $this->linkPage($row['page_id'],htmlspecialchars($this->makeTitle($row)),$copy_row);
+                               $title = $this->linkPage($row['page_id'], htmlspecialchars($this->makeTitle($row)), $copy_row);
                        }
                } else {        // Else the page:
 
@@ -1924,7 +1924,7 @@ class tx_indexedsearch extends tslib_pibase {
                                if ($this->firstRow['order_val2']) {
                                        $base = $row['order_val1']*256; // (3 MSB bit, 224 is highest value of order_val1 currently)
                                        $freqNumber = $row['order_val2']/$this->firstRow['order_val2']*pow(2, 12);      // 15-3 MSB = 12
-                                       $total = t3lib_utility_Math::forceIntegerInRange($base+$freqNumber,0,32767);
+                                       $total = t3lib_utility_Math::forceIntegerInRange($base+$freqNumber, 0, 32767);
                                        return ceil(log($total)/log(32767)*100).'%';
                                }
                        break;
@@ -2032,17 +2032,17 @@ class tx_indexedsearch extends tslib_pibase {
                                        // Possibly shorten string:
                                if (!$k)        {       // First entry at all (only cropped on the frontside)
                                        if ($strLen > $postPreLgd) {
-                                               $output[$k] = $divider.preg_replace('/^[^[:space:]]+[[:space:]]/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset)));
+                                               $output[$k] = $divider.preg_replace('/^[^[:space:]]+[[:space:]]/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], -($postPreLgd - $postPreLgd_offset)));
                                        }
                                } elseif ($summaryLgd > $summaryMax || !isset($parts[$k+1])) {  // In case summary length is exceed OR if there are no more entries at all:
                                        if ($strLen > $postPreLgd) {
-                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)).$divider;
+                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) . $divider;
                                        }
                                } else {        // In-between search words:
                                        if ($strLen > $postPreLgd*2) {
-                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)).
-                                                                               $divider.
-                                                                               preg_replace('/^[^[:space:]]+[[:space:]]/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset)));
+                                               $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) .
+                                                                               $divider .
+                                                                               preg_replace('/^[^[:space:]]+[[:space:]]/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], -($postPreLgd - $postPreLgd_offset)));
                                        }
                                }
                                $summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8', $output[$k]);
@@ -2196,7 +2196,7 @@ class tx_indexedsearch extends tslib_pibase {
         */
        function makeAccessIndication($id) {
                if (is_array($this->fe_groups_required[$id]) && count($this->fe_groups_required[$id])) {
-                       return '<img src="'.t3lib_extMgm::siteRelPath('indexed_search').'pi/res/locked.gif" width="12" height="15" vspace="5" title="'.sprintf($this->pi_getLL('res_memberGroups', '', 1),implode(',', array_unique($this->fe_groups_required[$id]))).'" alt="" />';
+                       return '<img src="' . t3lib_extMgm::siteRelPath('indexed_search') . 'pi/res/locked.gif" width="12" height="15" vspace="5" title="' . sprintf($this->pi_getLL('res_memberGroups', '', 1), implode(',', array_unique($this->fe_groups_required[$id]))) . '" alt="" />';
                }
        }