Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/Aphront404Response.php
<?php | <?php | ||||
final class Aphront404Response extends AphrontHTMLResponse { | final class Aphront404Response extends AphrontHTMLResponse { | ||||
public function getHTTPResponseCode() { | public function getHTTPResponseCode() { | ||||
return 404; | return 404; | ||||
} | } | ||||
public function buildResponseString() { | public function buildResponseString() { | ||||
$request = $this->getRequest(); | $request = $this->getRequest(); | ||||
$viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
// See T13636. Note that this response may be served from a Site other than | |||||
// the primary PlatformSite. For now, always link to the PlatformSite. | |||||
// (This may not be the best possible place to send users who are currently | |||||
// on "real" sites, like the BlogSite.) | |||||
$return_uri = PhabricatorEnv::getURI('/'); | |||||
$dialog = id(new AphrontDialogView()) | $dialog = id(new AphrontDialogView()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setTitle(pht('404 Not Found')) | ->setTitle(pht('404 Not Found')) | ||||
->addCancelButton('/', pht('Return to Charted Waters')) | ->addCancelButton($return_uri, pht('Return to Charted Waters')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'You arrive at your destination, but there is nothing here.')) | 'You arrive at your destination, but there is nothing here.')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'Perhaps the real treasure was the friends you made '. | 'Perhaps the real treasure was the friends you made '. | ||||
'along the way.')); | 'along the way.')); | ||||
Show All 10 Lines |