@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Mark deleted Phriction pages as closed.

Summary:
This replaces D4042 and gives you the option to search for existing Phrication
documents only.

Test Plan:
# Reindexed ALL THE THINGS, saw existing documents show up in search in all cases.
# Deleted a document and saw it only show up when "Open and Closed Documents" are
shown.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4289

authored by

Ricky Elrod and committed by
epriestley
ec57678f 19b2c3d3

+12
+4
src/applications/phid/handle/PhabricatorObjectHandleData.php
··· 505 505 $handle->setName($info['title']); 506 506 $handle->setURI(PhrictionDocument::getSlugURI($info['slug'])); 507 507 $handle->setComplete(true); 508 + if ($info['status'] != PhrictionDocumentStatus::STATUS_EXISTS) { 509 + $closed = PhabricatorObjectHandleStatus::STATUS_CLOSED; 510 + $handle->setStatus($closed); 511 + } 508 512 } 509 513 $handles[$phid] = $handle; 510 514 }
+8
src/applications/phriction/search/PhrictionSearchIndexer.php
··· 37 37 PhabricatorPHIDConstants::PHID_TYPE_USER, 38 38 $content->getDateCreated()); 39 39 40 + if ($document->getStatus() == PhrictionDocumentStatus::STATUS_EXISTS) { 41 + $doc->addRelationship( 42 + PhabricatorSearchRelationship::RELATIONSHIP_OPEN, 43 + $document->getPHID(), 44 + PhabricatorPHIDConstants::PHID_TYPE_WIKI, 45 + time()); 46 + } 47 + 40 48 return $doc; 41 49 } 42 50 }