Skip to content

Commit 5eb4d00

Browse files
committed
Merge branch 'master' into dfeyer-task-improve-pagination
2 parents 29fcaee + 97d8160 commit 5eb4d00

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

Classes/Flowpack/SearchPlugin/EelHelper/SearchArrayHelper.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ class SearchArrayHelper implements ProtectedContextAwareInterface {
2323
/**
2424
* Concatenate arrays or values to a new array
2525
*
26-
* @param array|mixed $array1 First array or value
27-
* @param array|mixed $array2 Second array or value
28-
* @param array|mixed $array_ Optional variable list of additional arrays / values
26+
* @param array|mixed $arrays First array or value
2927
* @return array The array with concatenated arrays or values
3028
*/
3129
public function flatten($arrays) {
3230
$return = array();
33-
array_walk_recursive($arrays, function($a) use (&$return) { $return[] = $a; });
31+
if (is_array($arrays)) {
32+
array_walk_recursive($arrays, function ($a) use (&$return) {
33+
$return[] = $a;
34+
});
35+
}
3436
return $return;
3537
}
3638

@@ -41,7 +43,7 @@ public function flatten($arrays) {
4143
* @return boolean
4244
*/
4345
public function allowsCallOfMethod($methodName) {
44-
return TRUE;
46+
return true;
4547
}
4648

4749
}

Resources/Private/TypoScript/SearchPlugin.ts2

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,33 @@ prototype(Flowpack.SearchPlugin:Search) {
77

88
searchForm = Flowpack.SearchPlugin:Search.Form
99

10-
searchResultRenderer = Flowpack.SearchPlugin:SearchResultRenderer
1110
configuration = TYPO3.TypoScript:RawArray {
1211
itemsPerPage = 25
1312
insertAbove = ${false}
1413
insertBelow = ${true}
1514
maximumNumberOfLinks = 10
1615
}
1716

18-
searchResultRenderer.@process.wrap = ${'<ol>' + value + '</ol>'}
17+
searchResultRenderer = TYPO3.TypoScript:Tag {
18+
tagName = 'ol'
19+
content = Flowpack.SearchPlugin:SearchResultRenderer
20+
}
1921
prototype(Flowpack.SearchPlugin:SingleResult).@process.wrap = ${'<li>' + value + '</li>'}
2022

2123
@cache {
2224
mode = 'uncached'
2325
context {
2426
1 = 'site'
2527
2 = 'node'
28+
3 = 'documentNode'
2629
}
2730
}
2831
}
2932

3033

3134
prototype(Flowpack.SearchPlugin:Search.Form) < prototype(TYPO3.TypoScript:Template) {
3235
node = ${site}
36+
3337
templatePath = 'resource://Flowpack.SearchPlugin/Private/Templates/NodeTypes/Search.Form.html'
3438
searchWord = ${request.arguments.search}
3539
}
@@ -41,4 +45,4 @@ prototype(Flowpack.SearchPlugin:SearchResultRenderer) < prototype(TYPO3.TypoScri
4145
itemName = 'node'
4246
// we also make the full ElasticSearch hit available to nested rendering, if possible
4347
itemRenderer.@override.searchHit = ${searchResults.searchHitForNode(node)}
44-
}
48+
}

0 commit comments

Comments
 (0)