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,10 +114,12 @@ switch($command) {
$result = array(); $result = array();
foreach($hits['docs'] as $hit) { foreach($hits['docs'] as $hit) {
if($hit->getAccessMode($user, 'search') >= M_READ) { if($hit->getAccessMode($user, 'search') >= M_READ) {
if($hit->getLatestContent()) {
// $result[] = $hit->getID().'#'.$hit->getName(); // $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'); header('Content-Type: application/json');
echo json_encode($result); echo json_encode($result);
} }