From 78d786c9eeb7b69d27cdaa7ce899764091218352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de> Date: Tue, 17 Apr 2018 10:47:51 +0200 Subject: [PATCH] fix(search): add position to fulltext results event --- inc/Ui/Search.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/Ui/Search.php b/inc/Ui/Search.php index 0d4e2725b..7092efab5 100644 --- a/inc/Ui/Search.php +++ b/inc/Ui/Search.php @@ -566,8 +566,10 @@ class Search extends Ui $html .= '<dl class="search_results">'; $num = 1; + $position = 1; foreach ($data as $id => $cnt) { + $position += 1; $resultLink = html_wikilink(':' . $id, null, $highlight); $resultHeader = [$resultLink]; @@ -602,6 +604,7 @@ class Search extends Ui 'resultHeader' => $resultHeader, 'resultBody' => $resultBody, 'page' => $id, + 'position' => $position, ]; trigger_event('SEARCH_RESULT_FULLPAGE', $eventData); $html .= '<div class="search_fullpage_result">'; -- GitLab