diff --git a/src/aphront/response/Aphront403Response.php b/src/aphront/response/Aphront403Response.php --- a/src/aphront/response/Aphront403Response.php +++ b/src/aphront/response/Aphront403Response.php @@ -25,10 +25,17 @@ $request = $this->getRequest(); $user = $request->getUser(); + $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); + if ($is_serious) { + $button_text = pht('Back'); + } else { + $button_text = pht('Peace Out'); + } + $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('403 Forbidden')) - ->addCancelButton('/', pht('Peace Out')) + ->addCancelButton('/', $button_text) ->appendParagraph($forbidden_text); $view = id(new PhabricatorStandardPageView()) diff --git a/src/aphront/response/Aphront404Response.php b/src/aphront/response/Aphront404Response.php --- a/src/aphront/response/Aphront404Response.php +++ b/src/aphront/response/Aphront404Response.php @@ -10,14 +10,24 @@ $request = $this->getRequest(); $user = $request->getUser(); + $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); + if ($is_serious) { + $body = pht( + 'The link you clicked may be misspelled or the page may '. + 'have been removed.'); + $button_text = pht('Back'); + } else { + $body = pht( + 'Do not dwell in the past, do not dream of the future, '. + 'concentrate the mind on the present moment.'); + $button_text = pht('Focus'); + } + $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('404 Not Found')) - ->addCancelButton('/', pht('Focus')) - ->appendParagraph( - pht( - 'Do not dwell in the past, do not dream of the future, '. - 'concentrate the mind on the present moment.')); + ->addCancelButton('/', $button_text) + ->appendParagraph($body); $view = id(new PhabricatorStandardPageView()) ->setTitle(pht('404 Not Found'))