@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.

Redirect older "/panel/" settings URIs to modern location

Summary:
Ref T11098. We have a fair number of these, including links in email, which we can't turn into explicit `/user/` URIs.

Just redirect them to the modern places.

Test Plan: Clicked "Customize Menu..." on home page.

Reviewers: chad, avivey

Reviewed By: avivey

Subscribers: avivey

Maniphest Tasks: T11098

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

+15
+2
src/applications/settings/application/PhabricatorSettingsApplication.php
··· 36 36 => 'PhabricatorSettingsMainController', 37 37 'builtin/(?P<builtin>global)/'.$panel_pattern 38 38 => 'PhabricatorSettingsMainController', 39 + 'panel/(?P<panel>[^/]+)/' 40 + => 'PhabricatorSettingsMainController', 39 41 'adjust/' => 'PhabricatorSettingsAdjustController', 40 42 'timezone/(?P<offset>[^/]+)/' 41 43 => 'PhabricatorSettingsTimezoneController',
+13
src/applications/settings/controller/PhabricatorSettingsMainController.php
··· 30 30 public function handleRequest(AphrontRequest $request) { 31 31 $viewer = $this->getViewer(); 32 32 33 + // Redirect "/panel/XYZ/" to the viewer's personal settings panel. This 34 + // was the primary URI before global settings were introduced and allows 35 + // generation of viewer-agnostic URIs for email. 36 + $panel = $request->getURIData('panel'); 37 + if ($panel) { 38 + $panel = phutil_escape_uri($panel); 39 + $username = $viewer->getUsername(); 40 + 41 + $panel_uri = "/user/{$username}/page/{$panel}/"; 42 + $panel_uri = $this->getApplicationURI($panel_uri); 43 + return id(new AphrontRedirectResponse())->setURI($panel_uri); 44 + } 45 + 33 46 $username = $request->getURIData('username'); 34 47 $builtin = $request->getURIData('builtin'); 35 48