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

Correct "Manage Password" link in Quickling in Diffusion

Summary: Fixes T12080. This was missing a "/", but stop hard-coding these URIs.

Test Plan: Clicked both links with Quickling as a logged-in and logged-out user, ended up in the right place.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12080

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

+20 -5
+10 -2
src/applications/diffusion/view/DiffusionCloneURIView.php
··· 35 35 } 36 36 37 37 public function render() { 38 + $viewer = $this->getViewer(); 39 + 38 40 require_celerity_resource('diffusion-icons-css'); 39 41 40 42 Javelin::initBehavior('select-content'); ··· 87 89 case PhabricatorRepositoryURI::IO_READWRITE: 88 90 switch ($uri->getBuiltinProtocol()) { 89 91 case PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH: 90 - $auth_uri = '/settings/panel/ssh/'; 92 + $auth_uri = id(new PhabricatorSSHKeysSettingsPanel()) 93 + ->setViewer($viewer) 94 + ->setUser($viewer) 95 + ->getPanelURI(); 91 96 $auth_tip = pht('Manage SSH Keys'); 92 97 $auth_disabled = false; 93 98 break; 94 99 default: 95 - $auth_uri = '/settings/panel/vcspassword'; 100 + $auth_uri = id(new DiffusionSetPasswordSettingsPanel()) 101 + ->setViewer($viewer) 102 + ->setUser($viewer) 103 + ->getPanelURI(); 96 104 $auth_tip = pht('Manage Password'); 97 105 $auth_disabled = false; 98 106 break;
+1 -1
src/applications/settings/controller/PhabricatorSettingsMainController.php
··· 32 32 33 33 // Redirect "/panel/XYZ/" to the viewer's personal settings panel. This 34 34 // was the primary URI before global settings were introduced and allows 35 - // generation of viewer-agnostic URIs for email. 35 + // generation of viewer-agnostic URIs for email and logged-out users. 36 36 $panel = $request->getURIData('panel'); 37 37 if ($panel) { 38 38 $panel = phutil_escape_uri($panel);
+9 -2
src/applications/settings/panel/PhabricatorSettingsPanel.php
··· 229 229 230 230 $user = $this->getUser(); 231 231 if ($user) { 232 - $username = $user->getUsername(); 233 - return "/settings/user/{$username}/page/{$key}/{$path}"; 232 + if ($user->isLoggedIn()) { 233 + $username = $user->getUsername(); 234 + return "/settings/user/{$username}/page/{$key}/{$path}"; 235 + } else { 236 + // For logged-out users, we can't put their username in the URI. This 237 + // page will prompt them to login, then redirect them to the correct 238 + // location. 239 + return "/settings/panel/{$key}/"; 240 + } 234 241 } else { 235 242 $builtin = $this->getPreferences()->getBuiltinKey(); 236 243 return "/settings/builtin/{$builtin}/page/{$key}/{$path}";