Use application PHIDs in Pholio Mocks
Summary: Ref T2715. Switch mocks to the new stuff. Test Plan: Used `phid.query` and `phid.lookup` to find mocks. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2715 Differential Revision: https://secure.phabricator.com/D6517
This commit is contained in:
@@ -210,7 +210,7 @@ final class PhabricatorSearchAttachController
|
||||
$noun = 'Commits';
|
||||
$selected = 'created';
|
||||
break;
|
||||
case PhabricatorPHIDConstants::PHID_TYPE_MOCK:
|
||||
case PholioPHIDTypeMock::TYPECONST:
|
||||
$noun = 'Mocks';
|
||||
$selected = 'created';
|
||||
break;
|
||||
@@ -251,7 +251,7 @@ final class PhabricatorSearchAttachController
|
||||
}
|
||||
|
||||
private function getFilters(array $strings) {
|
||||
if ($this->type == PhabricatorPHIDConstants::PHID_TYPE_MOCK) {
|
||||
if ($this->type == PholioPHIDTypeMock::TYPECONST) {
|
||||
$filters = array(
|
||||
'created' => 'Created By Me',
|
||||
'all' => 'All '.$strings['target_plural_noun'],
|
||||
@@ -272,7 +272,7 @@ final class PhabricatorSearchAttachController
|
||||
$t_cmit = PhabricatorRepositoryPHIDTypeCommit::TYPECONST;
|
||||
$t_task = ManiphestPHIDTypeTask::TYPECONST;
|
||||
$t_drev = DifferentialPHIDTypeRevision::TYPECONST;
|
||||
$t_mock = PhabricatorPHIDConstants::PHID_TYPE_MOCK;
|
||||
$t_mock = PholioPHIDTypeMock::TYPECONST;
|
||||
|
||||
$map = array(
|
||||
$t_cmit => array(
|
||||
|
||||
@@ -33,7 +33,7 @@ final class PhabricatorSearchSelectController
|
||||
$query->setParameter('author', array($user->getPHID()));
|
||||
// TODO - if / when we allow pholio mocks to be archived, etc
|
||||
// update this
|
||||
if ($this->type != PhabricatorPHIDConstants::PHID_TYPE_MOCK) {
|
||||
if ($this->type != PholioPHIDTypeMock::TYPECONST) {
|
||||
$query->setParameter('open', 1);
|
||||
}
|
||||
break;
|
||||
@@ -73,7 +73,7 @@ final class PhabricatorSearchSelectController
|
||||
case DifferentialPHIDTypeRevision::TYPECONST:
|
||||
$pattern = '/\bD(\d+)\b/i';
|
||||
break;
|
||||
case PhabricatorPHIDConstants::PHID_TYPE_MOCK:
|
||||
case PholioPHIDTypeMock::TYPECONST:
|
||||
$pattern = '/\bM(\d+)\b/i';
|
||||
break;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ final class PhabricatorSearchSelectController
|
||||
'id IN (%Ld)',
|
||||
$object_ids);
|
||||
break;
|
||||
case PhabricatorPHIDConstants::PHID_TYPE_MOCK:
|
||||
case PholioPHIDTypeMock::TYPECONST:
|
||||
$objects = id(new PholioMock())->loadAllWhere(
|
||||
'id IN (%Ld)',
|
||||
$object_ids);
|
||||
|
||||
Reference in New Issue
Block a user