Differential D20465 Diff 48839 src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | if (!$repository->isImporting()) { | ||||
$branches = id(new ConduitCall('diffusion.branchquery', $params)) | $branches = id(new ConduitCall('diffusion.branchquery', $params)) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->execute(); | ->execute(); | ||||
$branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches); | $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches); | ||||
$branches = $pager->sliceResults($branches); | $branches = $pager->sliceResults($branches); | ||||
$can_close_branches = ($repository->isHg()); | $can_close_branches = ($repository->isHg()); | ||||
$publisher = $repository->newPublisher(); | |||||
$rows = array(); | $rows = array(); | ||||
foreach ($branches as $branch) { | foreach ($branches as $branch) { | ||||
$branch_name = $branch->getShortName(); | $branch_name = $branch->getShortName(); | ||||
$permanent = $repository->shouldAutocloseBranch($branch_name); | $permanent = $publisher->shouldPublishRef($branch); | ||||
$default = $repository->getDefaultBranch(); | $default = $repository->getDefaultBranch(); | ||||
$icon = null; | $icon = null; | ||||
if ($default == $branch->getShortName()) { | if ($default == $branch->getShortName()) { | ||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIcon('fa-code-fork'); | ->setIcon('fa-code-fork'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |