Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / diffusion / herald / DiffusionCommitBranchesHeraldField.php
blob064830ebc3b75e4e12d270a3662cf79d6dfaa80d
1 <?php
3 final class DiffusionCommitBranchesHeraldField
4 extends DiffusionCommitHeraldField {
6 const FIELDCONST = 'diffusion.commit.branches';
8 public function getHeraldFieldName() {
9 return pht('Branches');
12 public function getHeraldFieldValue($object) {
13 $viewer = $this->getAdapter()->getViewer();
15 $commit = $object;
16 $repository = $object->getRepository();
18 $params = array(
19 'repository' => $repository->getPHID(),
20 'contains' => $commit->getCommitIdentifier(),
23 $result = id(new ConduitCall('diffusion.branchquery', $params))
24 ->setUser($viewer)
25 ->execute();
27 $refs = DiffusionRepositoryRef::loadAllFromDictionaries($result);
29 return mpull($refs, 'getShortName');
32 protected function getHeraldFieldStandardType() {
33 return self::STANDARD_TEXT_LIST;