Differential D9498 Diff 22755 src/applications/owners/controller/PhabricatorOwnersEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/controller/PhabricatorOwnersEditController.php
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
$this->setSideNavFilter($side_nav_filter); | $this->setSideNavFilter($side_nav_filter); | ||||
$repos = id(new PhabricatorRepositoryQuery()) | $repos = id(new PhabricatorRepositoryQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->execute(); | ->execute(); | ||||
$default_paths = array(); | $default_paths = array(); | ||||
foreach ($repos as $repo) { | foreach ($repos as $repo) { | ||||
$default_path = $repo->getDetail('default-owners-path'); | $subpath = $repo->getDetail('svn-subpath'); | ||||
$default_owners_path = $repo->getDetail('default-owners-path'); | |||||
if ($subpath) { | |||||
$default_path = '/' . ltrim($subpath, '/'); | |||||
} | |||||
if ($default_owners_path) { | |||||
if ($subpath) { | |||||
$default_path .= ltrim($default_owners_path, '/'); | |||||
} else { | |||||
$default_path = $default_owners_path; | |||||
} | |||||
} | |||||
if ($default_path) { | if ($default_path) { | ||||
$default_paths[$repo->getPHID()] = $default_path; | $default_paths[$repo->getPHID()] = $default_path; | ||||
} | } | ||||
} | } | ||||
$repos = mpull($repos, 'getCallsign', 'getPHID'); | $repos = mpull($repos, 'getCallsign', 'getPHID'); | ||||
$template = new AphrontTypeaheadTemplateView(); | $template = new AphrontTypeaheadTemplateView(); | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |