Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / repository / search / PhabricatorRepositoryFulltextEngine.php
blobf666af552fedb9eaa7d71d3807c65c1d0bbbc411
1 <?php
3 final class PhabricatorRepositoryFulltextEngine
4 extends PhabricatorFulltextEngine {
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument $document,
8 $object) {
9 $repo = $object;
10 $document->setDocumentTitle($repo->getName());
11 $document->addField(
12 PhabricatorSearchDocumentFieldType::FIELD_BODY,
13 $repo->getRepositorySlug()."\n".$repo->getDetail('description'));
15 $document->setDocumentCreated($repo->getDateCreated());
16 $document->setDocumentModified($repo->getDateModified());
18 $document->addRelationship(
19 $repo->isTracked()
20 ? PhabricatorSearchRelationship::RELATIONSHIP_OPEN
21 : PhabricatorSearchRelationship::RELATIONSHIP_CLOSED,
22 $repo->getPHID(),
23 PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
24 PhabricatorTime::getNow());