Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionTagListController.php
<?php | <?php | ||||
final class DiffusionTagListController extends DiffusionController { | final class DiffusionTagListController extends DiffusionController { | ||||
public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
return true; | return true; | ||||
} | } | ||||
protected function processDiffusionRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
$drequest = $this->getDiffusionRequest(); | $response = $this->loadDiffusionContext(); | ||||
$viewer = $request->getUser(); | if ($response) { | ||||
return $response; | |||||
} | |||||
$viewer = $this->getViewer(); | |||||
$drequest = $this->getDiffusionRequest(); | |||||
$repository = $drequest->getRepository(); | $repository = $drequest->getRepository(); | ||||
$pager = new PHUIPagerView(); | $pager = id(new PHUIPagerView()) | ||||
$pager->setURI($request->getRequestURI(), 'offset'); | ->readFromRequest($request); | ||||
$pager->setOffset($request->getInt('offset')); | |||||
$params = array( | $params = array( | ||||
'limit' => $pager->getPageSize() + 1, | 'limit' => $pager->getPageSize() + 1, | ||||
'offset' => $pager->getOffset(), | 'offset' => $pager->getOffset(), | ||||
); | ); | ||||
if ($drequest->getSymbolicCommit()) { | if (strlen($drequest->getSymbolicCommit())) { | ||||
$is_commit = true; | $is_commit = true; | ||||
$params['commit'] = $drequest->getSymbolicCommit(); | $params['commit'] = $drequest->getSymbolicCommit(); | ||||
} else { | } else { | ||||
$is_commit = false; | $is_commit = false; | ||||
} | } | ||||
switch ($repository->getVersionControlSystem()) { | switch ($repository->getVersionControlSystem()) { | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
} | } | ||||
$crumbs = $this->buildCrumbs( | $crumbs = $this->buildCrumbs( | ||||
array( | array( | ||||
'tags' => true, | 'tags' => true, | ||||
'commit' => $drequest->getSymbolicCommit(), | 'commit' => $drequest->getSymbolicCommit(), | ||||
)); | )); | ||||
return $this->buildApplicationPage( | $pager_box = $this->renderTablePagerBox($pager); | ||||
array( | |||||
$crumbs, | return $this->newPage() | ||||
$content, | ->setTitle( | ||||
$pager, | |||||
), | |||||
array( | array( | ||||
'title' => array( | |||||
pht('Tags'), | pht('Tags'), | ||||
$repository->getDisplayName(), | $repository->getDisplayName(), | ||||
), | )) | ||||
->setCrumbs($crumbs) | |||||
->appendChild( | |||||
array( | |||||
$content, | |||||
$pager_box, | |||||
)); | )); | ||||
} | } | ||||
} | } |