@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorOwnersPackageFulltextEngine
4 extends PhabricatorFulltextEngine {
5
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument $document,
8 $object) {
9
10 $package = $object;
11 $document->setDocumentTitle($package->getName());
12
13 // TODO: These are bogus, but not currently stored on packages.
14 $document->setDocumentCreated(PhabricatorTime::getNow());
15 $document->setDocumentModified(PhabricatorTime::getNow());
16
17 $document->addRelationship(
18 $package->isArchived()
19 ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
20 : PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
21 $package->getPHID(),
22 PhabricatorOwnersPackagePHIDType::TYPECONST,
23 PhabricatorTime::getNow());
24 }
25
26}