Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialController.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if ($have_owners) { | ||||
$packages = id(new PhabricatorOwnersPackageQuery()) | $packages = id(new PhabricatorOwnersPackageQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ||||
->withAuthorityPHIDs(array($viewer->getPHID())) | ->withAuthorityPHIDs(array($viewer->getPHID())) | ||||
->execute(); | ->execute(); | ||||
$toc_view->setAuthorityPackages($packages); | $toc_view->setAuthorityPackages($packages); | ||||
} | } | ||||
// TODO: For Subversion, we should adjust these paths to be relative to | $paths = mpull($changesets, 'getOwnersFilename'); | ||||
// the repository root where possible. | |||||
$paths = mpull($changesets, 'getFilename'); | |||||
$control_query = id(new PhabricatorOwnersPackageQuery()) | $control_query = id(new PhabricatorOwnersPackageQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ||||
->withControl($repository_phid, $paths); | ->withControl($repository_phid, $paths); | ||||
$control_query->execute(); | $control_query->execute(); | ||||
} | } | ||||
} | } | ||||
Show All 10 Lines | foreach ($changesets as $changeset_id => $changeset) { | ||||
->setIsVisible($is_visible) | ->setIsVisible($is_visible) | ||||
->setAnchor($anchor) | ->setAnchor($anchor) | ||||
->setCoverage(idx($coverage, $filename)) | ->setCoverage(idx($coverage, $filename)) | ||||
->setCoverageID($coverage_id); | ->setCoverageID($coverage_id); | ||||
if ($have_owners) { | if ($have_owners) { | ||||
$packages = $control_query->getControllingPackagesForPath( | $packages = $control_query->getControllingPackagesForPath( | ||||
$repository_phid, | $repository_phid, | ||||
$changeset->getFilename()); | $changeset->getOwnersFilename()); | ||||
$item->setPackages($packages); | $item->setPackages($packages); | ||||
} | } | ||||
$toc_view->addItem($item); | $toc_view->addItem($item); | ||||
} | } | ||||
return $toc_view; | return $toc_view; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |