Modernize most somewhat-weird Diffusion controllers
Summary: Ref T4245. This gets everything else except serving HTTP requests (complicated) and lint (quite weird). Test Plan: - Viewed a diff. - Viewed externals. - Viewed history table to see last modified. - Did path completion and validation in Owners. - Did tree path search in Diffusion. - Viewed a repository. - Created a new repository. - Looked up symbols. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4245 Differential Revision: https://secure.phabricator.com/D14947
This commit is contained in:
@@ -6,16 +6,19 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function processDiffusionRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getUser();
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$response = $this->loadDiffusionContext();
|
||||
if ($response) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$content = array();
|
||||
|
||||
$crumbs = $this->buildCrumbs();
|
||||
$content[] = $crumbs;
|
||||
|
||||
$content[] = $this->buildPropertiesTable($drequest->getRepository());
|
||||
|
||||
@@ -73,11 +76,14 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
->setErrors(array($empty_message));
|
||||
}
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$content,
|
||||
array(
|
||||
'title' => $drequest->getRepository()->getName(),
|
||||
));
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
$repository->getName(),
|
||||
$repository->getDisplayName(),
|
||||
))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user