From 2e21c7c6a0b0844c840d6146ff5ca76b988d8f8d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 26 Mar 2021 07:48:07 +0100 Subject: [PATCH] action 'typeahead' also returns the id of the folder/document --- views/bootstrap/class.Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 45bb60114..d79d22241 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -105,10 +105,10 @@ function typeahead() { /* {{{ */ foreach ($entries as $entry) { if($entry->isType('document')) { // $recs[] = 'D'.$entry->getName(); - $recs[] = array('type'=>'D', 'name'=>$entry->getName()); + $recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName()); } elseif($entry->isType('folder')) { // $recs[] = 'F'.$entry->getName(); - $recs[] = array('type'=>'F', 'name'=>$entry->getName()); + $recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName()); } } }