Diffusion - return 404 errors for bad URIs
Summary: Fixes T5646. Makes diffusion a much better user experience. Users now see a 404 exception page when they have a bad URI. Previously, they saw a developer-facing raw exception. Test Plan: played around in diffusion a bunch. most of these changes were fairly mechanical at the end of the day. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T5646 Differential Revision: https://secure.phabricator.com/D11299
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
final class DiffusionLintDetailsController extends DiffusionController {
|
||||
|
||||
public function processRequest() {
|
||||
protected function processDiffusionRequest(AphrontRequest $request) {
|
||||
$limit = 500;
|
||||
$offset = $this->getRequest()->getInt('offset', 0);
|
||||
$offset = $request->getInt('offset', 0);
|
||||
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$branch = $drequest->loadBranch();
|
||||
@@ -70,7 +70,7 @@ final class DiffusionLintDetailsController extends DiffusionController {
|
||||
->setPageSize($limit)
|
||||
->setOffset($offset)
|
||||
->setHasMorePages(count($messages) >= $limit)
|
||||
->setURI($this->getRequest()->getRequestURI(), 'offset');
|
||||
->setURI($request->getRequestURI(), 'offset');
|
||||
|
||||
$content[] = id(new AphrontPanelView())
|
||||
->setNoBackground(true)
|
||||
|
||||
Reference in New Issue
Block a user