diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 1e59f85ef2..aeda184aa6 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -533,6 +533,7 @@ phutil_register_library_map(array( 'DivinerLiveBook' => 'applications/diviner/storage/DivinerLiveBook.php', 'DivinerLivePublisher' => 'applications/diviner/publisher/DivinerLivePublisher.php', 'DivinerLiveSymbol' => 'applications/diviner/storage/DivinerLiveSymbol.php', + 'DivinerPHIDTypeAtom' => 'applications/diviner/phid/DivinerPHIDTypeAtom.php', 'DivinerPHIDTypeBook' => 'applications/diviner/phid/DivinerPHIDTypeBook.php', 'DivinerPublishCache' => 'applications/diviner/cache/DivinerPublishCache.php', 'DivinerPublisher' => 'applications/diviner/publisher/DivinerPublisher.php', @@ -2537,6 +2538,7 @@ phutil_register_library_map(array( 1 => 'PhabricatorPolicyInterface', 2 => 'PhabricatorMarkupInterface', ), + 'DivinerPHIDTypeAtom' => 'PhabricatorPHIDType', 'DivinerPHIDTypeBook' => 'PhabricatorPHIDType', 'DivinerPublishCache' => 'DivinerDiskCache', 'DivinerRemarkupRuleSymbol' => 'PhutilRemarkupRule', diff --git a/src/applications/diviner/phid/DivinerPHIDTypeAtom.php b/src/applications/diviner/phid/DivinerPHIDTypeAtom.php new file mode 100644 index 0000000000..51f8c472c3 --- /dev/null +++ b/src/applications/diviner/phid/DivinerPHIDTypeAtom.php @@ -0,0 +1,42 @@ +setViewer($query->getViewer()) + ->withPHIDs($phids) + ->execute(); + } + + public function loadHandles( + PhabricatorHandleQuery $query, + array $handles, + array $objects) { + + foreach ($handles as $phid => $handle) { + $atom = $objects[$phid]; + + $handle->setName($atom->getTitle()); + $handle->setURI($atom->getName()); + } + } + +} diff --git a/src/applications/diviner/storage/DivinerLiveSymbol.php b/src/applications/diviner/storage/DivinerLiveSymbol.php index c1d6f8387d..a4eef16282 100644 --- a/src/applications/diviner/storage/DivinerLiveSymbol.php +++ b/src/applications/diviner/storage/DivinerLiveSymbol.php @@ -29,7 +29,7 @@ final class DivinerLiveSymbol extends DivinerDAO public function generatePHID() { return PhabricatorPHID::generateNewPHID( - PhabricatorPHIDConstants::PHID_TYPE_ATOM); + DivinerPHIDTypeAtom::TYPECONST); } public function getBook() { diff --git a/src/applications/phid/PhabricatorPHIDConstants.php b/src/applications/phid/PhabricatorPHIDConstants.php index 65588087b0..4acb6d7562 100644 --- a/src/applications/phid/PhabricatorPHIDConstants.php +++ b/src/applications/phid/PhabricatorPHIDConstants.php @@ -22,7 +22,6 @@ final class PhabricatorPHIDConstants { const PHID_TYPE_XCMT = 'XCMT'; - const PHID_TYPE_ATOM = 'ATOM'; const PHID_TYPE_AUTH = 'AUTH'; const PHID_TYPE_XOBJ = 'XOBJ';