diff --git a/_build/build.transport.php b/_build/build.transport.php index d69efe5..110b76e 100755 --- a/_build/build.transport.php +++ b/_build/build.transport.php @@ -40,7 +40,7 @@ define('PKG_NAME','SimpleSearch'); define('PKG_NAME_LOWER','simplesearch'); define('PKG_VERSION','1.8.1'); -define('PKG_RELEASE','beta1'); +define('PKG_RELEASE','beta2'); /* define sources */ $root = dirname(dirname(__FILE__)).'/'; diff --git a/core/components/simplesearch/elements/snippets/simplesearch.snippet.php b/core/components/simplesearch/elements/snippets/simplesearch.snippet.php index d44a3f9..1dd07ad 100755 --- a/core/components/simplesearch/elements/snippets/simplesearch.snippet.php +++ b/core/components/simplesearch/elements/snippets/simplesearch.snippet.php @@ -83,7 +83,6 @@ $resultsTpl = array('default' => array('results' => array(),'total' => $response['total'])); if (!empty($response['results'])) { /* iterate through search results */ - $total = count($response['results']); foreach ($response['results'] as $resourceArray) { $resourceArray['idx'] = $idx; if (empty($resourceArray['link'])) { @@ -99,7 +98,7 @@ $extract = str_replace(array('[[',']]'),'',$extract); $resourceArray['extract'] = !empty($highlightResults) ? $search->addHighlighting($extract,$highlightClass,$highlightTag) : $extract; } - $resultsTpl['default']['results'][] = $search->getChunk($tpl,$resourceArray) . (($total > $idx) ? $outputSeparator : ""); + $resultsTpl['default']['results'][] = $search->getChunk($tpl,$resourceArray); $idx++; } } @@ -129,7 +128,7 @@ foreach ($facetResults['results'] as $r) { $r['idx'] = $idx; $fTpl = !empty($scriptProperties['tpl'.$facetKey]) ? $scriptProperties['tpl'.$facetKey] : $tpl; - $resultsTpl[$facetKey]['results'][] = $search->getChunk($fTpl,$r) . (($facetResults['total'] > $idx) ? $outputSeparator : ""); + $resultsTpl[$facetKey]['results'][] = $search->getChunk($fTpl,$r); $idx++; } } @@ -139,7 +138,7 @@ /* set faceted results to placeholders for easy result positioning */ $output = array(); foreach ($resultsTpl as $facetKey => $facetResults) { - $resultSet = implode("\n",$facetResults['results']); + $resultSet = implode($outputSeparator,$facetResults['results']); $placeholders[$facetKey.'.results'] = $resultSet; $placeholders[$facetKey.'.total'] = !empty($facetResults['total']) ? $facetResults['total'] : 0; $placeholders[$facetKey.'.key'] = $facetKey;