check for latest content

This commit is contained in:
Uwe Steinmann 2024-03-23 11:57:13 +01:00
parent 5fc7c85bf2
commit a00655932b

View File

@ -114,8 +114,10 @@ switch($command) {
$result = array();
foreach($hits['docs'] as $hit) {
if($hit->getAccessMode($user, 'search') >= M_READ) {
if($hit->getLatestContent()) {
// $result[] = $hit->getID().'#'.$hit->getName();
$result[] = array('type'=>'D', 'id'=>$hit->getId(), 'name'=>htmlspecialchars($hit->getName()), 'path'=>htmlspecialchars($hit->getParent()->getFolderPathPlain(true, '/')));
$result[] = array('type'=>'D', 'id'=>$hit->getId(), 'name'=>htmlspecialchars($hit->getName()), 'path'=>htmlspecialchars($hit->getParent()->getFolderPathPlain(true, '/')));
}
}
}
header('Content-Type: application/json');