public function queueNewDocumentLinkVersion(Docman_Link $item, Docman_LinkVersion $version)
 {
     if ($this->plugin->isAllowed($item->getGroupId()) && $version->getNumber() > 1) {
         $this->system_event_manager->createEvent(SystemEvent_FULLTEXTSEARCH_DOCMAN_UPDATELINK::NAME, $this->getDocmanSerializedParameters($item, array($version->getNumber())), SystemEvent::PRIORITY_MEDIUM, SystemEvent::OWNER_APP);
     }
 }
 /**
  * Index a new document with permissions
  *
  * @param Docman_Item    $item    The docman item
  * @param Docman_Version $version The version to index
  */
 public function indexNewLinkVersion(Docman_Item $item, Docman_LinkVersion $version)
 {
     try {
         $this->client->getIndexedElement($item->getGroupId(), $item->getId());
         $this->logger->debug('index new link version #' . $version->getId() . ' for document #' . $item->getId());
         $indexed_data = $this->getIndexedData($item) + $this->getLinkContent($item);
         $this->client->update($item->getGroupId(), $item->getId(), $indexed_data);
     } catch (ElasticSearch_ElementNotIndexed $exception) {
         $this->indexNewLinkDocument($item);
         return;
     }
 }
Esempio n. 3
0
 public function userAccessedSinceLastUpdate($user)
 {
     $log = new Docman_Log();
     return $log->userAccessedSince($user->getId(), $this->item->getId(), $this->itemVersion->getDate());
 }