Differential D11789 Diff 28422 src/applications/diffusion/controller/DiffusionCommitBranchesController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionCommitBranchesController.php
| <?php | <?php | ||||
| final class DiffusionCommitBranchesController extends DiffusionController { | final class DiffusionCommitBranchesController extends DiffusionController { | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| protected function processDiffusionRequest(AphrontRequest $request) { | protected function processDiffusionRequest(AphrontRequest $request) { | ||||
| $drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
| $repository = $drequest->getRepository(); | |||||
| switch ($repository->getVersionControlSystem()) { | |||||
| case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | |||||
| $branches = array(); | $branches = array(); | ||||
| try { | break; | ||||
| default: | |||||
| $branches = $this->callConduitWithDiffusionRequest( | $branches = $this->callConduitWithDiffusionRequest( | ||||
| 'diffusion.branchquery', | 'diffusion.branchquery', | ||||
| array( | array( | ||||
| 'contains' => $drequest->getCommit(), | 'contains' => $drequest->getCommit(), | ||||
| )); | )); | ||||
| } catch (ConduitException $ex) { | break; | ||||
| if ($ex->getMessage() != 'ERR-UNSUPPORTED-VCS') { | |||||
| throw $ex; | |||||
| } | |||||
| } | } | ||||
| $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches); | $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches); | ||||
| $branch_links = array(); | $branch_links = array(); | ||||
| foreach ($branches as $branch) { | foreach ($branches as $branch) { | ||||
| $branch_links[] = phutil_tag( | $branch_links[] = phutil_tag( | ||||
| 'a', | 'a', | ||||
| array( | array( | ||||
| 'href' => $drequest->generateURI( | 'href' => $drequest->generateURI( | ||||
| array( | array( | ||||
| 'action' => 'browse', | 'action' => 'browse', | ||||
| Show All 10 Lines | |||||