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

Use application PHIDs for ATOM

Summary: Ref T2715.

Test Plan: `phid.query`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715

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

+45 -2
+2
src/__phutil_library_map__.php
··· 533 533 'DivinerLiveBook' => 'applications/diviner/storage/DivinerLiveBook.php', 534 534 'DivinerLivePublisher' => 'applications/diviner/publisher/DivinerLivePublisher.php', 535 535 'DivinerLiveSymbol' => 'applications/diviner/storage/DivinerLiveSymbol.php', 536 + 'DivinerPHIDTypeAtom' => 'applications/diviner/phid/DivinerPHIDTypeAtom.php', 536 537 'DivinerPHIDTypeBook' => 'applications/diviner/phid/DivinerPHIDTypeBook.php', 537 538 'DivinerPublishCache' => 'applications/diviner/cache/DivinerPublishCache.php', 538 539 'DivinerPublisher' => 'applications/diviner/publisher/DivinerPublisher.php', ··· 2537 2538 1 => 'PhabricatorPolicyInterface', 2538 2539 2 => 'PhabricatorMarkupInterface', 2539 2540 ), 2541 + 'DivinerPHIDTypeAtom' => 'PhabricatorPHIDType', 2540 2542 'DivinerPHIDTypeBook' => 'PhabricatorPHIDType', 2541 2543 'DivinerPublishCache' => 'DivinerDiskCache', 2542 2544 'DivinerRemarkupRuleSymbol' => 'PhutilRemarkupRule',
+42
src/applications/diviner/phid/DivinerPHIDTypeAtom.php
··· 1 + <?php 2 + 3 + final class DivinerPHIDTypeAtom extends PhabricatorPHIDType { 4 + 5 + const TYPECONST = 'ATOM'; 6 + 7 + public function getTypeConstant() { 8 + return self::TYPECONST; 9 + } 10 + 11 + public function getTypeName() { 12 + return pht('Atom'); 13 + } 14 + 15 + public function newObject() { 16 + return new DivinerLiveSymbol(); 17 + } 18 + 19 + public function loadObjects( 20 + PhabricatorObjectQuery $query, 21 + array $phids) { 22 + 23 + return id(new DivinerAtomQuery()) 24 + ->setViewer($query->getViewer()) 25 + ->withPHIDs($phids) 26 + ->execute(); 27 + } 28 + 29 + public function loadHandles( 30 + PhabricatorHandleQuery $query, 31 + array $handles, 32 + array $objects) { 33 + 34 + foreach ($handles as $phid => $handle) { 35 + $atom = $objects[$phid]; 36 + 37 + $handle->setName($atom->getTitle()); 38 + $handle->setURI($atom->getName()); 39 + } 40 + } 41 + 42 + }
+1 -1
src/applications/diviner/storage/DivinerLiveSymbol.php
··· 29 29 30 30 public function generatePHID() { 31 31 return PhabricatorPHID::generateNewPHID( 32 - PhabricatorPHIDConstants::PHID_TYPE_ATOM); 32 + DivinerPHIDTypeAtom::TYPECONST); 33 33 } 34 34 35 35 public function getBook() {
-1
src/applications/phid/PhabricatorPHIDConstants.php
··· 22 22 23 23 const PHID_TYPE_XCMT = 'XCMT'; 24 24 25 - const PHID_TYPE_ATOM = 'ATOM'; 26 25 const PHID_TYPE_AUTH = 'AUTH'; 27 26 const PHID_TYPE_XOBJ = 'XOBJ'; 28 27