Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / project / engineextension / PhabricatorProjectsAncestorsSearchEngineAttachment.php
blob3113068664fb044580850425ead10bcda10c1afa
1 <?php
3 final class PhabricatorProjectsAncestorsSearchEngineAttachment
4 extends PhabricatorSearchEngineAttachment {
6 public function getAttachmentName() {
7 return pht('Project Ancestors');
10 public function getAttachmentDescription() {
11 return pht('Get the full ancestor list for each project.');
14 public function getAttachmentForObject($object, $data, $spec) {
15 $ancestors = $object->getAncestorProjects();
17 // Order ancestors by depth, ascending.
18 $ancestors = array_reverse($ancestors);
20 $results = array();
21 foreach ($ancestors as $ancestor) {
22 $results[] = $ancestor->getRefForConduit();
25 return array(
26 'ancestors' => $results,