Skip to content

Commit

Permalink
Merge pull request nextcloud#50 from nextcloud/backport/49/master
Browse files Browse the repository at this point in the history
update Info before filling the document
  • Loading branch information
ArtificialOwl authored Feb 12, 2019
2 parents 05b528a + dd5693e commit f1eaf0d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/Provider/FilesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,14 @@ public function generateIndexableDocuments(string $userId, string $chunk): array
*/
public function fillIndexDocument(IndexDocument $document) {
/** @var FilesDocument $document */
$this->updateRunnerInfoArray(
[
'info' => $document->getMimetype(),
'title' => $document->getPath()
]
);

$this->filesService->generateDocument($document);
$this->updateRunnerInfo('info', $document->getMimetype());
}


Expand Down Expand Up @@ -335,5 +341,16 @@ private function updateRunnerInfo(string $info, string $value) {
$this->runner->setInfo($info, $value);
}

/**
* @param array $info
*/
private function updateRunnerInfoArray(array $info) {
if ($this->runner === null) {
return;
}

$this->runner->setInfoArray($info);
}

}

0 comments on commit f1eaf0d

Please sign in to comment.