@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Provide a more informative alternative to 404 on invalid shortened Phurl URL

Summary: When accessing an invalid URL on the short Phurl domain, users should see informative message

Test Plan: Open URL in the previously configured Phurl short domain such as `https://www.zz.us` and see dialog with message. Open `https://www.zz.us/u/123` for a valid `U123` Phurl and access destination URL.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14450

+11 -1
+11 -1
src/applications/phurl/controller/PhabricatorPhurlShortURLDefaultController.php
··· 8 8 } 9 9 10 10 public function handleRequest(AphrontRequest $request) { 11 - return new Aphront404Response(); 11 + $dialog = $this->newDialog() 12 + ->setTitle(pht('Invalid URL')) 13 + ->appendParagraph( 14 + pht('This domain can only be used to open URLs'. 15 + ' shortened using the Phurl application. The'. 16 + ' URL you are trying to access does not have'. 17 + ' a Phurl URL associated with it.')); 18 + 19 + return id(new AphrontDialogResponse()) 20 + ->setDialog($dialog) 21 + ->setHTTPResponseCode(404); 12 22 } 13 23 }