Fixes T10679. Added a 'short url' field to the phurl link page and changed the "view url" button to link to the shortened version
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T10679: When phurl.short-uri is configured, use it in the UI
- Commits
- rP7ce585393685: Start actually showing the phurl urls to users
Create a phurl link (or navigate to an existing one) and note that there is now a field for "Short URL". Also verified that the "Visit URL" button in the top right still works as intended
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
One meaningful inline about robustness in the face of trailing slashes.
src/applications/phurl/controller/PhabricatorPhurlURLViewController.php | ||
---|---|---|
144–146 | Maybe put this first (above "Original URL")? Seems like the most likely field that users are interested in, probably. | |
src/applications/phurl/storage/PhabricatorPhurlURL.php | ||
106–107 | We should probably use PhutilURI() here and do setPath() to be robust against users specifying http://example.whatever (with no trailing slash) as their phurl.short-uri -- something like this? if (!$short_domain) { return $path; } $uri = new PhutilURI($short_domain); $uri->setPath($path); return (string)$uri; Then that should work properly whether users set http://x.com (no slash) or http://x.com/ (with slash). |