Skip to content

Commit cdffd16

Browse files
committed
Updating to 1.8.1-beta2
Handling outputSeparator much better now. thanks @theboxer
1 parent ab836e5 commit cdffd16

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

_build/build.transport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
define('PKG_NAME','SimpleSearch');
4141
define('PKG_NAME_LOWER','simplesearch');
4242
define('PKG_VERSION','1.8.1');
43-
define('PKG_RELEASE','beta1');
43+
define('PKG_RELEASE','beta2');
4444

4545
/* define sources */
4646
$root = dirname(dirname(__FILE__)).'/';

core/components/simplesearch/elements/snippets/simplesearch.snippet.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
$resultsTpl = array('default' => array('results' => array(),'total' => $response['total']));
8484
if (!empty($response['results'])) {
8585
/* iterate through search results */
86-
$total = count($response['results']);
8786
foreach ($response['results'] as $resourceArray) {
8887
$resourceArray['idx'] = $idx;
8988
if (empty($resourceArray['link'])) {
@@ -99,7 +98,7 @@
9998
$extract = str_replace(array('[[',']]'),'',$extract);
10099
$resourceArray['extract'] = !empty($highlightResults) ? $search->addHighlighting($extract,$highlightClass,$highlightTag) : $extract;
101100
}
102-
$resultsTpl['default']['results'][] = $search->getChunk($tpl,$resourceArray) . (($total > $idx) ? $outputSeparator : "");
101+
$resultsTpl['default']['results'][] = $search->getChunk($tpl,$resourceArray);
103102
$idx++;
104103
}
105104
}
@@ -129,7 +128,7 @@
129128
foreach ($facetResults['results'] as $r) {
130129
$r['idx'] = $idx;
131130
$fTpl = !empty($scriptProperties['tpl'.$facetKey]) ? $scriptProperties['tpl'.$facetKey] : $tpl;
132-
$resultsTpl[$facetKey]['results'][] = $search->getChunk($fTpl,$r) . (($facetResults['total'] > $idx) ? $outputSeparator : "");
131+
$resultsTpl[$facetKey]['results'][] = $search->getChunk($fTpl,$r);
133132
$idx++;
134133
}
135134
}
@@ -139,7 +138,7 @@
139138
/* set faceted results to placeholders for easy result positioning */
140139
$output = array();
141140
foreach ($resultsTpl as $facetKey => $facetResults) {
142-
$resultSet = implode("\n",$facetResults['results']);
141+
$resultSet = implode($outputSeparator,$facetResults['results']);
143142
$placeholders[$facetKey.'.results'] = $resultSet;
144143
$placeholders[$facetKey.'.total'] = !empty($facetResults['total']) ? $facetResults['total'] : 0;
145144
$placeholders[$facetKey.'.key'] = $facetKey;

0 commit comments

Comments
 (0)