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

Replace "getRequestURI()->setQueryParams(array())" with "getPath()"

Summary:
Ref T13250. A handful of callsites are doing `getRequestURI()` + `setQueryParams(array())` to get a bare request path.

They can just use `getPath()` instead.

Test Plan: See inlines.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13250

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

+9 -15
+5 -7
src/aphront/response/AphrontAjaxResponse.php
··· 32 32 } 33 33 34 34 public function buildResponseString() { 35 + $request = $this->getRequest(); 35 36 $console = $this->getConsole(); 36 37 if ($console) { 37 38 // NOTE: We're stripping query parameters here both for readability and 38 39 // to mitigate BREACH and similar attacks. The parameters are available 39 40 // in the "Request" tab, so this should not impact usability. See T3684. 40 - $uri = $this->getRequest()->getRequestURI(); 41 - $uri = new PhutilURI($uri); 42 - $uri->setQueryParams(array()); 41 + $path = $request->getPath(); 43 42 44 43 Javelin::initBehavior( 45 44 'dark-console', 46 45 array( 47 - 'uri' => (string)$uri, 48 - 'key' => $console->getKey($this->getRequest()), 46 + 'uri' => $path, 47 + 'key' => $console->getKey($request), 49 48 'color' => $console->getColor(), 50 - 'quicksand' => $this->getRequest()->isQuicksand(), 49 + 'quicksand' => $request->isQuicksand(), 51 50 )); 52 51 } 53 52 ··· 60 59 61 60 $response = CelerityAPI::getStaticResourceResponse(); 62 61 63 - $request = $this->getRequest(); 64 62 if ($request) { 65 63 $viewer = $request->getViewer(); 66 64 if ($viewer) {
+1 -2
src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php
··· 11 11 $viewer = $request->getViewer(); 12 12 $id = $request->getURIData('channelID'); 13 13 14 - $uri = clone $request->getRequestURI(); 15 - $uri->setQueryParams(array()); 14 + $uri = new PhutilURI($request->getPath()); 16 15 17 16 $pager = new AphrontCursorPagerView(); 18 17 $pager->setURI($uri);
+1 -2
src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php
··· 54 54 return new Aphront404Response(); 55 55 } 56 56 57 - $uri = $request->getRequestURI(); 58 - $uri->setQueryParams(array()); 57 + $uri = new PhutilURI($request->getPath()); 59 58 60 59 $new = $request->getStr('new'); 61 60 $edit = $request->getInt('edit');
+1 -2
src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php
··· 31 31 $user = $this->getUser(); 32 32 $editable = PhabricatorEnv::getEnvConfig('account.editable'); 33 33 34 - $uri = $request->getRequestURI(); 35 - $uri->setQueryParams(array()); 34 + $uri = new PhutilURI($request->getPath()); 36 35 37 36 if ($editable) { 38 37 $new = $request->getStr('new');
+1 -2
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 1279 1279 1280 1280 $fields = $this->willBuildEditForm($object, $fields); 1281 1281 1282 - $request_path = $request->getRequestURI() 1283 - ->setQueryParams(array()); 1282 + $request_path = $request->getPath(); 1284 1283 1285 1284 $form = id(new AphrontFormView()) 1286 1285 ->setUser($viewer)