[TASK] Use arrays in str_replace() calls
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / SearchResultContentObject.php
index 78c5110..81c9b4e 100644 (file)
@@ -238,10 +238,19 @@ class SearchResultContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstra
                                $targetPart = $LD['target'] ? ' target="' . htmlspecialchars($LD['target']) . '"' : '';
                                $urlParams = $this->cObj->URLqMark($LD['totalURL'], '&sword=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sword')) . '&scols=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scols')) . '&stype=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype')) . '&scount=' . $total);
                                // substitution:
-                               $result = $this->cObj->cObjGetSingle($conf['layout'], $conf['layout.'], 'layout');
-                               $result = str_replace('###RANGELOW###', $rangeLow, $result);
-                               $result = str_replace('###RANGEHIGH###', $rangeHigh, $result);
-                               $result = str_replace('###TOTAL###', $total, $result);
+                               $result = str_replace(
+                                       array(
+                                               '###RANGELOW###',
+                                               '###RANGEHIGH###',
+                                               '###TOTAL###'
+                                       ),
+                                       array(
+                                               $rangeLow,
+                                               $rangeHigh,
+                                               $total
+                                       ),
+                                       $this->cObj->cObjGetSingle($conf['layout'], $conf['layout.'], 'layout')
+                               );
                                if ($rangeHigh < $total) {
                                        $next = $this->cObj->cObjGetSingle($conf['next'], $conf['next.'], 'next');
                                        $next = '<a href="' . htmlspecialchars(($urlParams . '&spointer=' . ($spointer + $theRange))) . '"' . $targetPart . $GLOBALS['TSFE']->ATagParams . '>' . $next . '</a>';
@@ -654,6 +663,3 @@ class SearchResultContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstra
        }
 
 }
-
-
-?>
\ No newline at end of file