diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index c7e748a863..a0301ae63f 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1375,6 +1375,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleListController' => 'applications/people/controller/PhabricatorPeopleListController.php', 'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php', 'PhabricatorPeoplePHIDTypeExternal' => 'applications/people/phid/PhabricatorPeoplePHIDTypeExternal.php', + 'PhabricatorPeoplePHIDTypeUser' => 'applications/people/phid/PhabricatorPeoplePHIDTypeUser.php', 'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php', 'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php', 'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php', @@ -3410,6 +3411,7 @@ phutil_register_library_map(array( ), 'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController', 'PhabricatorPeoplePHIDTypeExternal' => 'PhabricatorPHIDType', + 'PhabricatorPeoplePHIDTypeUser' => 'PhabricatorPHIDType', 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleController', diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php index 345c4ad006..0e1b7a5477 100644 --- a/src/applications/audit/controller/PhabricatorAuditListController.php +++ b/src/applications/audit/controller/PhabricatorAuditListController.php @@ -219,7 +219,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { case 'active': case 'user': case 'author': - if ($type !== PhabricatorPHIDConstants::PHID_TYPE_USER) { + if ($type !== PhabricatorPeoplePHIDTypeUser::TYPECONST) { throw new Exception("PHID must be a user PHID!"); } break; diff --git a/src/applications/differential/mail/DifferentialMail.php b/src/applications/differential/mail/DifferentialMail.php index 12b6503144..52bc35d665 100644 --- a/src/applications/differential/mail/DifferentialMail.php +++ b/src/applications/differential/mail/DifferentialMail.php @@ -142,7 +142,7 @@ abstract class DifferentialMail extends PhabricatorMail { continue; } $type = $reason_handles[$relation['reasonPHID']]->getType(); - if ($type == PhabricatorPHIDConstants::PHID_TYPE_USER) { + if ($type == PhabricatorPeoplePHIDTypeUser::TYPECONST) { $explicit_cc[] = $relation['objectPHID']; } } diff --git a/src/applications/differential/search/DifferentialSearchIndexer.php b/src/applications/differential/search/DifferentialSearchIndexer.php index 785b44005f..efd2e08eb7 100644 --- a/src/applications/differential/search/DifferentialSearchIndexer.php +++ b/src/applications/differential/search/DifferentialSearchIndexer.php @@ -41,7 +41,7 @@ final class DifferentialSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $rev->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $rev->getDateCreated()); if ($rev->getStatus() != ArcanistDifferentialRevisionStatus::CLOSED && @@ -79,7 +79,7 @@ final class DifferentialSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_TOUCH, $touch, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $time); } @@ -92,14 +92,14 @@ final class DifferentialSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OWNER, $phid, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $rev->getDateModified()); // Bogus timestamp. } } else { $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OWNER, $rev->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $rev->getDateCreated()); } diff --git a/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php b/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php index da7cc9cfb3..dd7e9867a6 100644 --- a/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php +++ b/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php @@ -105,7 +105,7 @@ abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod { $owner_phid = $request->getValue('ownerPHID'); if ($owner_phid !== null) { $this->validatePHIDList(array($owner_phid), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, 'ownerPHID'); $changes[ManiphestTransactionType::TYPE_OWNER] = $owner_phid; } @@ -113,7 +113,7 @@ abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod { $ccs = $request->getValue('ccPHIDs'); if ($ccs !== null) { $this->validatePHIDList($ccs, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, 'ccPHIDS'); $changes[ManiphestTransactionType::TYPE_CCS] = $ccs; } diff --git a/src/applications/maniphest/search/ManiphestSearchIndexer.php b/src/applications/maniphest/search/ManiphestSearchIndexer.php index 8b4685be18..88ce02f25f 100644 --- a/src/applications/maniphest/search/ManiphestSearchIndexer.php +++ b/src/applications/maniphest/search/ManiphestSearchIndexer.php @@ -27,7 +27,7 @@ final class ManiphestSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $task->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $task->getDateCreated()); if ($task->getStatus() == ManiphestTaskStatus::STATUS_OPEN) { @@ -88,7 +88,7 @@ final class ManiphestSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OWNER, $owner->getNewValue(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $owner->getDateCreated()); } else { $doc->addRelationship( @@ -104,7 +104,7 @@ final class ManiphestSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_TOUCH, $touch, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $time); } diff --git a/src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php b/src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php index 237b4736b3..2e893dc93f 100644 --- a/src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php +++ b/src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php @@ -33,7 +33,7 @@ final class PhabricatorMetaMTAActorQuery extends PhabricatorQuery { foreach ($type_map as $type => $phids) { switch ($type) { - case PhabricatorPHIDConstants::PHID_TYPE_USER: + case PhabricatorPeoplePHIDTypeUser::TYPECONST: $this->loadUserActors($actors, $phids); break; case PhabricatorPeoplePHIDTypeExternal::TYPECONST: diff --git a/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php b/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php index e0d333cae0..67f95aec22 100644 --- a/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php +++ b/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php @@ -280,7 +280,7 @@ EOBODY; PhabricatorObjectHandle $handle, $prefix) { - if ($handle->getType() != PhabricatorPHIDConstants::PHID_TYPE_USER) { + if ($handle->getType() != PhabricatorPeoplePHIDTypeUser::TYPECONST) { // You must be a real user to get a private reply handler address. return null; } diff --git a/src/applications/owners/conduit/ConduitAPI_owners_query_Method.php b/src/applications/owners/conduit/ConduitAPI_owners_query_Method.php index 5ec7602c7a..b36b977aed 100644 --- a/src/applications/owners/conduit/ConduitAPI_owners_query_Method.php +++ b/src/applications/owners/conduit/ConduitAPI_owners_query_Method.php @@ -44,7 +44,7 @@ final class ConduitAPI_owners_query_Method protected static function queryByOwner($owner) { $is_valid_phid = - phid_get_type($owner) == PhabricatorPHIDConstants::PHID_TYPE_USER || + phid_get_type($owner) == PhabricatorPeoplePHIDTypeUser::TYPECONST || phid_get_type($owner) == PhabricatorProjectPHIDTypeProject::TYPECONST; if (!$is_valid_phid) { diff --git a/src/applications/owners/storage/PhabricatorOwnersOwner.php b/src/applications/owners/storage/PhabricatorOwnersOwner.php index 68859a0127..5a3c4f35f1 100644 --- a/src/applications/owners/storage/PhabricatorOwnersOwner.php +++ b/src/applications/owners/storage/PhabricatorOwnersOwner.php @@ -38,7 +38,7 @@ final class PhabricatorOwnersOwner extends PhabricatorOwnersDAO { $all_phids = phid_group_by_type(mpull($owners, 'getUserPHID')); $user_phids = idx($all_phids, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, array()); $users_in_project_phids = array(); diff --git a/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php b/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php new file mode 100644 index 0000000000..2f6910d7af --- /dev/null +++ b/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php @@ -0,0 +1,52 @@ +needProfileImage(true) + ->needStatus(true) + ->setViewer($query->getViewer()) + ->withPHIDs($phids) + ->execute(); + } + + public function loadHandles( + PhabricatorHandleQuery $query, + array $handles, + array $objects) { + + foreach ($handles as $phid => $handle) { + $user = $objects[$phid]; + $handle->setName($user->getUsername()); + $handle->setURI('/p/'.$user->getUsername().'/'); + $handle->setFullName( + $user->getUsername().' ('.$user->getRealName().')'); + $handle->setImageURI($user->loadProfileImageURI()); + if ($user->hasStatus()) { + $status = $user->getStatus(); + $handle->setStatus($status->getTextStatus()); + $handle->setTitle($status->getTerseSummary($query->getViewer())); + } + } + + } + +} diff --git a/src/applications/people/query/PhabricatorPeopleQuery.php b/src/applications/people/query/PhabricatorPeopleQuery.php index cd9aeed22f..a4e73d8b16 100644 --- a/src/applications/people/query/PhabricatorPeopleQuery.php +++ b/src/applications/people/query/PhabricatorPeopleQuery.php @@ -18,6 +18,7 @@ final class PhabricatorPeopleQuery private $needPrimaryEmail; private $needProfile; private $needProfileImage; + private $needStatus; public function withIDs(array $ids) { $this->ids = $ids; @@ -89,6 +90,11 @@ final class PhabricatorPeopleQuery return $this; } + public function needStatus($need) { + $this->needStatus = $need; + return $this; + } + public function loadPage() { $table = new PhabricatorUser(); $conn_r = $table->establishConnection('r'); @@ -143,6 +149,18 @@ final class PhabricatorPeopleQuery } } + if ($this->needStatus) { + $user_list = mpull($users, null, 'getPHID'); + $statuses = id(new PhabricatorUserStatus())->loadCurrentStatuses( + array_keys($user_list)); + foreach ($user_list as $phid => $user) { + $status = idx($statuses, $phid); + if ($status) { + $user->attachStatus($status); + } + } + } + return $users; } diff --git a/src/applications/people/search/PhabricatorUserSearchIndexer.php b/src/applications/people/search/PhabricatorUserSearchIndexer.php index 64a119823b..8e7cd6984d 100644 --- a/src/applications/people/search/PhabricatorUserSearchIndexer.php +++ b/src/applications/people/search/PhabricatorUserSearchIndexer.php @@ -12,7 +12,7 @@ final class PhabricatorUserSearchIndexer $doc = new PhabricatorSearchAbstractDocument(); $doc->setPHID($user->getPHID()); - $doc->setDocumentType(PhabricatorPHIDConstants::PHID_TYPE_USER); + $doc->setDocumentType(PhabricatorPeoplePHIDTypeUser::TYPECONST); $doc->setDocumentTitle($user->getUserName().' ('.$user->getRealName().')'); $doc->setDocumentCreated($user->getDateCreated()); $doc->setDocumentModified($user->getDateModified()); @@ -24,7 +24,7 @@ final class PhabricatorUserSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_OPEN, $user->getPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, time()); } diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 324131194d..b3e8aece53 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -32,7 +32,7 @@ final class PhabricatorUser private $profileImage = null; private $profile = null; - private $status = null; + private $status = self::ATTACHABLE; private $preferences = null; private $omnipotent = false; private $customFields = array(); @@ -65,7 +65,7 @@ final class PhabricatorUser public function generatePHID() { return PhabricatorPHID::generateNewPHID( - PhabricatorPHIDConstants::PHID_TYPE_USER); + PhabricatorPeoplePHIDTypeUser::TYPECONST); } public function setPassword(PhutilOpaqueEnvelope $envelope) { @@ -662,6 +662,20 @@ EOBODY; return celerity_get_resource_uri('/rsrc/image/avatar.png'); } + public function attachStatus(PhabricatorUserStatus $status) { + $this->status = $status; + return $this; + } + + public function getStatus() { + $this->assertAttached($this->status); + return $this->status; + } + + public function hasStatus() { + return $this->status !== self::ATTACHABLE; + } + public function attachProfileImageURI($uri) { $this->profileImage = $uri; return $this; diff --git a/src/applications/people/storage/PhabricatorUserTransaction.php b/src/applications/people/storage/PhabricatorUserTransaction.php index 67095c216d..50b8c5c36a 100644 --- a/src/applications/people/storage/PhabricatorUserTransaction.php +++ b/src/applications/people/storage/PhabricatorUserTransaction.php @@ -8,7 +8,7 @@ final class PhabricatorUserTransaction } public function getApplicationTransactionType() { - return PhabricatorPHIDConstants::PHID_TYPE_USER; + return PhabricatorPeoplePHIDTypeUser::TYPECONST; } public function getApplicationTransactionCommentObject() { diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php index 1748c62b6e..6832c213c6 100644 --- a/src/applications/phid/PhabricatorObjectHandle.php +++ b/src/applications/phid/PhabricatorObjectHandle.php @@ -107,11 +107,7 @@ final class PhabricatorObjectHandle return $this->getPHIDType()->getTypeName(); } - static $map = array( - PhabricatorPHIDConstants::PHID_TYPE_USER => 'User', - ); - - return idx($map, $this->getType(), $this->getType()); + return $this->getType(); } @@ -201,7 +197,7 @@ final class PhabricatorObjectHandle public function getLinkName() { switch ($this->getType()) { - case PhabricatorPHIDConstants::PHID_TYPE_USER: + case PhabricatorPeoplePHIDTypeUser::TYPECONST: $name = $this->getName(); break; default: diff --git a/src/applications/phid/handle/PhabricatorObjectHandleData.php b/src/applications/phid/handle/PhabricatorObjectHandleData.php index f6bb8e8c47..6014a1783a 100644 --- a/src/applications/phid/handle/PhabricatorObjectHandleData.php +++ b/src/applications/phid/handle/PhabricatorObjectHandleData.php @@ -48,14 +48,6 @@ final class PhabricatorObjectHandleData { switch ($type) { - case PhabricatorPHIDConstants::PHID_TYPE_USER: - // TODO: Update query + Batch User Images - $user_dao = new PhabricatorUser(); - $users = $user_dao->loadAllWhere( - 'phid in (%Ls)', - $phids); - return mpull($users, null, 'getPHID'); - case PhabricatorPHIDConstants::PHID_TYPE_APRJ: $project_dao = new PhabricatorRepositoryArcanistProject(); $projects = $project_dao->loadAllWhere( @@ -145,53 +137,6 @@ final class PhabricatorObjectHandleData { } break; - case PhabricatorPHIDConstants::PHID_TYPE_USER: - $image_phids = mpull($objects, 'getProfileImagePHID'); - $image_phids = array_unique(array_filter($image_phids)); - - $images = array(); - if ($image_phids) { - $images = id(new PhabricatorFile())->loadAllWhere( - 'phid IN (%Ls)', - $image_phids); - $images = mpull($images, 'getBestURI', 'getPHID'); - } - - $statuses = id(new PhabricatorUserStatus())->loadCurrentStatuses( - $phids); - - foreach ($phids as $phid) { - $handle = new PhabricatorObjectHandle(); - $handle->setPHID($phid); - $handle->setType($type); - if (empty($objects[$phid])) { - $handle->setName('Unknown User'); - } else { - $user = $objects[$phid]; - $handle->setName($user->getUsername()); - $handle->setURI('/p/'.$user->getUsername().'/'); - $handle->setFullName( - $user->getUsername().' ('.$user->getRealName().')'); - $handle->setComplete(true); - if (isset($statuses[$phid])) { - $handle->setStatus($statuses[$phid]->getTextStatus()); - $handle->setTitle( - $statuses[$phid]->getTerseSummary($this->viewer)); - } - $handle->setDisabled($user->getIsDisabled()); - - $img_uri = idx($images, $user->getProfileImagePHID()); - if ($img_uri) { - $handle->setImageURI($img_uri); - } else { - $handle->setImageURI( - PhabricatorUser::getDefaultProfileImageURI()); - } - } - $handles[$phid] = $handle; - } - break; - case PhabricatorPHIDConstants::PHID_TYPE_APRJ: foreach ($phids as $phid) { $handle = new PhabricatorObjectHandle(); diff --git a/src/applications/pholio/search/PholioSearchIndexer.php b/src/applications/pholio/search/PholioSearchIndexer.php index d73a174c45..2ca69100b1 100644 --- a/src/applications/pholio/search/PholioSearchIndexer.php +++ b/src/applications/pholio/search/PholioSearchIndexer.php @@ -26,7 +26,7 @@ final class PholioSearchIndexer extends PhabricatorSearchDocumentIndexer { $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $mock->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $mock->getDateCreated()); return $doc; diff --git a/src/applications/phriction/search/PhrictionSearchIndexer.php b/src/applications/phriction/search/PhrictionSearchIndexer.php index c56cf89043..e4928a2f81 100644 --- a/src/applications/phriction/search/PhrictionSearchIndexer.php +++ b/src/applications/phriction/search/PhrictionSearchIndexer.php @@ -34,7 +34,7 @@ final class PhrictionSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $content->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $content->getDateCreated()); if ($document->getStatus() == PhrictionDocumentStatus::STATUS_EXISTS) { diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php index 8f525d75de..9a26b952eb 100644 --- a/src/applications/policy/filter/PhabricatorPolicyFilter.php +++ b/src/applications/policy/filter/PhabricatorPolicyFilter.php @@ -209,7 +209,7 @@ final class PhabricatorPolicyFilter { } else { $this->rejectObject($object, $policy, $capability); } - } else if ($type == PhabricatorPHIDConstants::PHID_TYPE_USER) { + } else if ($type == PhabricatorPeoplePHIDTypeUser::TYPECONST) { if ($viewer->getPHID() == $policy) { return true; } else { @@ -271,7 +271,7 @@ final class PhabricatorPolicyFilter { if ($type == PhabricatorProjectPHIDTypeProject::TYPECONST) { $who = "To {$verb} this object, you must be a member of project ". "'".$handle->getFullName()."'."; - } else if ($type == PhabricatorPHIDConstants::PHID_TYPE_USER) { + } else if ($type == PhabricatorPeoplePHIDTypeUser::TYPECONST) { $who = "Only '".$handle->getFullName()."' can {$verb} this object."; } else { $who = "It is unclear who can {$verb} this object."; diff --git a/src/applications/ponder/search/PonderSearchIndexer.php b/src/applications/ponder/search/PonderSearchIndexer.php index 113b37d8ea..49f69d662f 100644 --- a/src/applications/ponder/search/PonderSearchIndexer.php +++ b/src/applications/ponder/search/PonderSearchIndexer.php @@ -26,7 +26,7 @@ final class PonderSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $question->getAuthorPHID(), - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $question->getDateCreated()); $comments = $question->getComments(); diff --git a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php index 4a0ee96418..219ea29a41 100644 --- a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php +++ b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php @@ -43,7 +43,7 @@ final class PhabricatorRepositoryCommitSearchIndexer $doc->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR, $author_phid, - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, $date_created); } diff --git a/src/applications/search/index/PhabricatorSearchAbstractDocument.php b/src/applications/search/index/PhabricatorSearchAbstractDocument.php index 0baf036b4c..8f73be1f33 100644 --- a/src/applications/search/index/PhabricatorSearchAbstractDocument.php +++ b/src/applications/search/index/PhabricatorSearchAbstractDocument.php @@ -19,7 +19,7 @@ final class PhabricatorSearchAbstractDocument { PhabricatorRepositoryPHIDTypeCommit::TYPECONST => 'Repository Commits', ManiphestPHIDTypeTask::TYPECONST => 'Maniphest Tasks', PhrictionPHIDTypeDocument::TYPECONST => 'Phriction Documents', - PhabricatorPHIDConstants::PHID_TYPE_USER => 'Phabricator Users', + PhabricatorPeoplePHIDTypeUser::TYPECONST => 'Phabricator Users', PonderPHIDTypeQuestion::TYPECONST => 'Ponder Questions', ); } diff --git a/src/applications/uiexample/examples/PhabricatorHovercardExample.php b/src/applications/uiexample/examples/PhabricatorHovercardExample.php index d319d55e41..9f653b60a5 100644 --- a/src/applications/uiexample/examples/PhabricatorHovercardExample.php +++ b/src/applications/uiexample/examples/PhabricatorHovercardExample.php @@ -53,7 +53,7 @@ final class PhabricatorHovercardExample extends PhabricatorUIExample { $user_handle = $this->createBasicDummyHandle( 'gwashington', - PhabricatorPHIDConstants::PHID_TYPE_USER, + PhabricatorPeoplePHIDTypeUser::TYPECONST, 'George Washington'); $user_handle->setImageURI( celerity_get_resource_uri('/rsrc/image/people/washington.png')); diff --git a/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php b/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php index 27d42b42b3..f63c5cf960 100644 --- a/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php +++ b/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php @@ -154,7 +154,6 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants { } static $class_map = array( - PhabricatorPHIDConstants::PHID_TYPE_USER => 'PhabricatorUser', PhabricatorPHIDConstants::PHID_TYPE_TOBJ => 'HarbormasterObject', PhabricatorPHIDConstants::PHID_TYPE_ANSW => 'PonderAnswer', PhabricatorPHIDConstants::PHID_TYPE_ACNT => 'PhortuneAccount',