diff --git a/src/applications/phid/handle/PhabricatorObjectHandleData.php b/src/applications/phid/handle/PhabricatorObjectHandleData.php index 4cba669f1a..ccc4556718 100644 --- a/src/applications/phid/handle/PhabricatorObjectHandleData.php +++ b/src/applications/phid/handle/PhabricatorObjectHandleData.php @@ -505,6 +505,10 @@ final class PhabricatorObjectHandleData { $handle->setName($info['title']); $handle->setURI(PhrictionDocument::getSlugURI($info['slug'])); $handle->setComplete(true); + if ($info['status'] != PhrictionDocumentStatus::STATUS_EXISTS) { + $closed = PhabricatorObjectHandleStatus::STATUS_CLOSED; + $handle->setStatus($closed); + } } $handles[$phid] = $handle; } diff --git a/src/applications/phriction/search/PhrictionSearchIndexer.php b/src/applications/phriction/search/PhrictionSearchIndexer.php index f2565b2495..5786e05a4f 100644 --- a/src/applications/phriction/search/PhrictionSearchIndexer.php +++ b/src/applications/phriction/search/PhrictionSearchIndexer.php @@ -37,6 +37,14 @@ final class PhrictionSearchIndexer PhabricatorPHIDConstants::PHID_TYPE_USER, $content->getDateCreated()); + if ($document->getStatus() == PhrictionDocumentStatus::STATUS_EXISTS) { + $doc->addRelationship( + PhabricatorSearchRelationship::RELATIONSHIP_OPEN, + $document->getPHID(), + PhabricatorPHIDConstants::PHID_TYPE_WIKI, + time()); + } + return $doc; } }