Modernize more Diffusion controllers

Summary: Ref T4245. Standardize how context is read, minor updates / modernizations / consistency tweaks.

Test Plan:
  - Viewed a change.
  - Viewed brnaches.
  - Edited a commit.
  - Viewed tags.
  - Viewed history.
  - Added, edited and deleted a mirror.
  - Viewed push events.
  - Viewed a particular event.
  - Viewed ref disambiguation.
  - Viewed repository list.
  - Ran automation test.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14944
This commit is contained in:
epriestley
2016-01-05 08:13:05 -08:00
parent f1c298203a
commit 2bfc5ff92e
12 changed files with 144 additions and 149 deletions

View File

@@ -6,9 +6,13 @@ final class DiffusionRefTableController extends DiffusionController {
return true;
}
protected function processDiffusionRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
public function handleRequest(AphrontRequest $request) {
$response = $this->loadDiffusionContext();
if ($response) {
return $response;
}
$viewer = $this->getViewer();
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
@@ -132,18 +136,15 @@ final class DiffusionRefTableController extends DiffusionController {
$crumbs = $this->buildCrumbs(array());
$crumbs->addTextCrumb(pht('Refs'));
return $this->buildApplicationPage(
array(
$crumbs,
$content,
),
array(
'title' => array(
pht('Refs'),
$repository->getMonogram(),
return $this->newPage()
->setTitle(
array(
$ref_name,
),
));
pht('Ref'),
$repository->getDisplayName(),
))
->setCrumbs($crumbs)
->appendChild($content);
}
}