@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 all "setQueryParam()" calls with "remove/replaceQueryParam()"

Summary: Ref T13250. See D20149. Mostly: clarify semantics. Partly: remove magic "null" behavior.

Test Plan: Poked around, but mostly just inspection since these are pretty much one-for-one.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: yelirekim

Maniphest Tasks: T13250

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

+87 -75
+1 -1
src/aphront/AphrontRequest.php
··· 594 594 $request_uri = idx($_SERVER, 'REQUEST_URI', '/'); 595 595 596 596 $uri = new PhutilURI($request_uri); 597 - $uri->setQueryParam('__path__', null); 597 + $uri->removeQueryParam('__path__'); 598 598 599 599 $path = phutil_escape_uri($this->getPath()); 600 600 $uri->setPath($path);
+1 -1
src/applications/almanac/controller/AlmanacController.php
··· 137 137 138 138 $phid = $object->getPHID(); 139 139 $add_uri = id(new PhutilURI($edit_base)) 140 - ->setQueryParam('objectPHID', $object->getPHID()); 140 + ->replaceQueryParam('objectPHID', $object->getPHID()); 141 141 142 142 $can_edit = PhabricatorPolicyFilter::hasCapability( 143 143 $viewer,
+1 -1
src/applications/auth/controller/PhabricatorAuthController.php
··· 95 95 96 96 private function buildLoginValidateResponse(PhabricatorUser $user) { 97 97 $validate_uri = new PhutilURI($this->getApplicationURI('validate/')); 98 - $validate_uri->setQueryParam('expect', $user->getUsername()); 98 + $validate_uri->replaceQueryParam('expect', $user->getUsername()); 99 99 100 100 return id(new AphrontRedirectResponse())->setURI((string)$validate_uri); 101 101 }
+2 -2
src/applications/auth/controller/PhabricatorAuthStartController.php
··· 54 54 } 55 55 56 56 $redirect_uri = $request->getRequestURI(); 57 - $redirect_uri->setQueryParam('cleared', 1); 57 + $redirect_uri->replaceQueryParam('cleared', 1); 58 58 return id(new AphrontRedirectResponse())->setURI($redirect_uri); 59 59 } 60 60 } ··· 64 64 // the workflow will continue normally. 65 65 if ($did_clear) { 66 66 $redirect_uri = $request->getRequestURI(); 67 - $redirect_uri->setQueryParam('cleared', null); 67 + $redirect_uri->removeQueryParam('cleared'); 68 68 return id(new AphrontRedirectResponse())->setURI($redirect_uri); 69 69 } 70 70
+1 -1
src/applications/auth/controller/config/PhabricatorAuthNewController.php
··· 32 32 $provider_class = get_class($provider); 33 33 34 34 $provider_uri = id(new PhutilURI('/config/edit/')) 35 - ->setQueryParam('provider', $provider_class); 35 + ->replaceQueryParam('provider', $provider_class); 36 36 $provider_uri = $this->getApplicationURI($provider_uri); 37 37 38 38 $already_exists = isset($configured_classes[get_class($provider)]);
+1 -1
src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderEditController.php
··· 45 45 46 46 foreach ($factors as $factor_key => $factor) { 47 47 $factor_uri = id(new PhutilURI('/mfa/edit/')) 48 - ->setQueryParam('providerFactorKey', $factor_key); 48 + ->replaceQueryParam('providerFactorKey', $factor_key); 49 49 $factor_uri = $this->getApplicationURI($factor_uri); 50 50 51 51 $is_enabled = $factor->canCreateNewProvider();
+1 -1
src/applications/auth/extension/PhabricatorAuthMainMenuBarExtension.php
··· 42 42 $uri = new PhutilURI('/auth/start/'); 43 43 if ($controller) { 44 44 $path = $controller->getRequest()->getPath(); 45 - $uri->setQueryParam('next', $path); 45 + $uri->replaceQueryParam('next', $path); 46 46 } 47 47 48 48 return id(new PHUIButtonView())
+3 -3
src/applications/calendar/controller/PhabricatorCalendarImportViewController.php
··· 234 234 235 235 $all_uri = $this->getApplicationURI('import/log/'); 236 236 $all_uri = (string)id(new PhutilURI($all_uri)) 237 - ->setQueryParam('importSourcePHID', $import->getPHID()); 237 + ->replaceQueryParam('importSourcePHID', $import->getPHID()); 238 238 239 239 $all_button = id(new PHUIButtonView()) 240 240 ->setTag('a') ··· 273 273 274 274 $all_uri = $this->getApplicationURI(); 275 275 $all_uri = (string)id(new PhutilURI($all_uri)) 276 - ->setQueryParam('importSourcePHID', $import->getPHID()) 277 - ->setQueryParam('display', 'list'); 276 + ->replaceQueryParam('importSourcePHID', $import->getPHID()) 277 + ->replaceQueryParam('display', 'list'); 278 278 279 279 $all_button = id(new PHUIButtonView()) 280 280 ->setTag('a')
+1 -1
src/applications/config/check/PhabricatorWebServerSetupCheck.php
··· 40 40 41 41 $base_uri = id(new PhutilURI($base_uri)) 42 42 ->setPath($send_path) 43 - ->setQueryParam($expect_key, $expect_value); 43 + ->replaceQueryParam($expect_key, $expect_value); 44 44 45 45 $self_future = id(new HTTPSFuture($base_uri)) 46 46 ->addHeader('X-Phabricator-SelfCheck', 1)
+1 -1
src/applications/conpherence/controller/ConpherenceViewController.php
··· 188 188 } else { 189 189 // user not logged in so give them a login button. 190 190 $login_href = id(new PhutilURI('/auth/start/')) 191 - ->setQueryParam('next', '/'.$conpherence->getMonogram()); 191 + ->replaceQueryParam('next', '/'.$conpherence->getMonogram()); 192 192 return id(new PHUIFormLayoutView()) 193 193 ->addClass('login-to-participate') 194 194 ->appendInstructions(pht('Log in to join this room and participate.'))
+2 -2
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 287 287 $edit_uri = "/dashboard/panel/edit/{$panel_id}/"; 288 288 $edit_uri = new PhutilURI($edit_uri); 289 289 if ($dashboard_id) { 290 - $edit_uri->setQueryParam('dashboardID', $dashboard_id); 290 + $edit_uri->replaceQueryParam('dashboardID', $dashboard_id); 291 291 } 292 292 293 293 $action_edit = id(new PHUIIconView()) ··· 303 303 304 304 $remove_uri = "/dashboard/removepanel/{$dashboard_id}/"; 305 305 $remove_uri = id(new PhutilURI($remove_uri)) 306 - ->setQueryParam('panelPHID', $panel_phid); 306 + ->replaceQueryParam('panelPHID', $panel_phid); 307 307 308 308 $action_remove = id(new PHUIIconView()) 309 309 ->setIcon('fa-trash-o')
+3 -3
src/applications/dashboard/engine/PhabricatorDashboardRenderingEngine.php
··· 113 113 $dashboard_id = $this->dashboard->getID(); 114 114 115 115 $create_uri = id(new PhutilURI('/dashboard/panel/create/')) 116 - ->setQueryParam('dashboardID', $dashboard_id) 117 - ->setQueryParam('column', $column); 116 + ->replaceQueryParam('dashboardID', $dashboard_id) 117 + ->replaceQueryParam('column', $column); 118 118 119 119 $add_uri = id(new PhutilURI('/dashboard/addpanel/'.$dashboard_id.'/')) 120 - ->setQueryParam('column', $column); 120 + ->replaceQueryParam('column', $column); 121 121 122 122 $create_button = id(new PHUIButtonView()) 123 123 ->setTag('a')
+1 -1
src/applications/differential/controller/DifferentialDiffCreateController.php
··· 71 71 $uri = $this->getApplicationURI("diff/{$diff_id}/"); 72 72 $uri = new PhutilURI($uri); 73 73 if ($revision) { 74 - $uri->setQueryParam('revisionID', $revision->getID()); 74 + $uri->replaceQueryParam('revisionID', $revision->getID()); 75 75 } 76 76 77 77 return id(new AphrontRedirectResponse())->setURI($uri);
+1 -1
src/applications/fact/controller/PhabricatorFactHomeController.php
··· 11 11 12 12 if ($request->isFormPost()) { 13 13 $uri = new PhutilURI('/fact/chart/'); 14 - $uri->setQueryParam('y1', $request->getStr('y1')); 14 + $uri->replaceQueryParam('y1', $request->getStr('y1')); 15 15 return id(new AphrontRedirectResponse())->setURI($uri); 16 16 } 17 17
+1 -1
src/applications/files/controller/PhabricatorFileLightboxController.php
··· 70 70 71 71 if (!$viewer->isLoggedIn()) { 72 72 $login_href = id(new PhutilURI('/auth/start/')) 73 - ->setQueryParam('next', '/'.$file->getMonogram()); 73 + ->replaceQueryParam('next', '/'.$file->getMonogram()); 74 74 return id(new PHUIFormLayoutView()) 75 75 ->addClass('phui-comment-panel-empty') 76 76 ->appendChild(
+1 -1
src/applications/files/controller/PhabricatorFileTransformListController.php
··· 61 61 62 62 $view_href = $file->getURIForTransform($xform); 63 63 $view_href = new PhutilURI($view_href); 64 - $view_href->setQueryParam('regenerate', 'true'); 64 + $view_href->replaceQueryParam('regenerate', 'true'); 65 65 66 66 $view_text = pht('Regenerate'); 67 67
+1 -1
src/applications/files/markup/PhabricatorImageRemarkupRule.php
··· 149 149 )); 150 150 } else { 151 151 $src_uri = id(new PhutilURI('/file/imageproxy/')) 152 - ->setQueryParam('uri', $uri); 152 + ->replaceQueryParam('uri', $uri); 153 153 154 154 $img = id(new PHUIRemarkupImageView()) 155 155 ->setURI($src_uri)
+3 -3
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 300 300 $subtask_form = head($subtask_options); 301 301 $form_key = $subtask_form->getIdentifier(); 302 302 $subtask_uri = id(new PhutilURI("/task/edit/form/{$form_key}/")) 303 - ->setQueryParam('parent', $id) 304 - ->setQueryParam('template', $id) 305 - ->setQueryParam('status', ManiphestTaskStatus::getDefaultStatus()); 303 + ->replaceQueryParam('parent', $id) 304 + ->replaceQueryParam('template', $id) 305 + ->replaceQueryParam('status', ManiphestTaskStatus::getDefaultStatus()); 306 306 $subtask_workflow = false; 307 307 } 308 308
+3 -3
src/applications/maniphest/controller/ManiphestTaskSubtaskController.php
··· 47 47 $subtype = $subtype_map->getSubtype($subtype_key); 48 48 49 49 $subtask_uri = id(new PhutilURI("/task/edit/form/{$form_key}/")) 50 - ->setQueryParam('parent', $id) 51 - ->setQueryParam('template', $id) 52 - ->setQueryParam('status', ManiphestTaskStatus::getDefaultStatus()); 50 + ->replaceQueryParam('parent', $id) 51 + ->replaceQueryParam('template', $id) 52 + ->replaceQueryParam('status', ManiphestTaskStatus::getDefaultStatus()); 53 53 $subtask_uri = $this->getApplicationURI($subtask_uri); 54 54 55 55 $item = id(new PHUIObjectItemView())
+1 -1
src/applications/maniphest/view/ManiphestTaskListView.php
··· 135 135 if ($this->showBatchControls) { 136 136 $href = new PhutilURI('/maniphest/task/edit/'.$task->getID().'/'); 137 137 if (!$this->showSubpriorityControls) { 138 - $href->setQueryParam('ungrippable', 'true'); 138 + $href->replaceQueryParam('ungrippable', 'true'); 139 139 } 140 140 $item->addAction( 141 141 id(new PHUIListItemView())
+3 -3
src/applications/multimeter/controller/MultimeterSampleController.php
··· 302 302 if (!strlen($group)) { 303 303 $group = null; 304 304 } 305 - $uri->setQueryParam('group', $group); 305 + $uri->replaceQueryParam('group', $group); 306 306 307 307 if ($wipe) { 308 308 foreach ($this->getColumnMap() as $key => $column) { 309 - $uri->setQueryParam($key, null); 309 + $uri->removeQueryParam($key); 310 310 } 311 311 } 312 312 ··· 317 317 $value = (array)$value; 318 318 319 319 $uri = clone $this->getRequest()->getRequestURI(); 320 - $uri->setQueryParam($key, implode(',', $value)); 320 + $uri->replaceQueryParam($key, implode(',', $value)); 321 321 322 322 return phutil_tag( 323 323 'a',
+1 -1
src/applications/notification/client/PhabricatorNotificationServerRef.php
··· 153 153 154 154 $instance = PhabricatorEnv::getEnvConfig('cluster.instance'); 155 155 if (strlen($instance)) { 156 - $uri->setQueryParam('instance', $instance); 156 + $uri->replaceQueryParam('instance', $instance); 157 157 } 158 158 159 159 return $uri;
+1 -1
src/applications/notification/controller/PhabricatorNotificationPanelController.php
··· 25 25 26 26 $notifications_view = $builder->buildView(); 27 27 $content = $notifications_view->render(); 28 - $clear_uri->setQueryParam( 28 + $clear_uri->replaceQueryParam( 29 29 'chronoKey', 30 30 head($stories)->getChronologicalKey()); 31 31 } else {
+1 -1
src/applications/notification/query/PhabricatorNotificationSearchEngine.php
··· 111 111 ->setUser($viewer); 112 112 113 113 $view = $builder->buildView(); 114 - $clear_uri->setQueryParam( 114 + $clear_uri->replaceQueryParam( 115 115 'chronoKey', 116 116 head($notifications)->getChronologicalKey()); 117 117 } else {
+1 -1
src/applications/oauthserver/PhabricatorOAuthResponse.php
··· 36 36 $base_uri = $this->getClientURI(); 37 37 $query_params = $this->buildResponseDict(); 38 38 foreach ($query_params as $key => $value) { 39 - $base_uri->setQueryParam($key, $value); 39 + $base_uri->replaceQueryParam($key, $value); 40 40 } 41 41 return $base_uri; 42 42 }
+1 -1
src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php
··· 306 306 307 307 foreach ($params as $key => $value) { 308 308 if (strlen($value)) { 309 - $full_uri->setQueryParam($key, $value); 309 + $full_uri->replaceQueryParam($key, $value); 310 310 } 311 311 } 312 312
+1 -1
src/applications/pholio/view/PholioMockImagesView.php
··· 133 133 ); 134 134 135 135 $login_uri = id(new PhutilURI('/login/')) 136 - ->setQueryParam('next', (string)$this->getRequestURI()); 136 + ->replaceQueryParam('next', (string)$this->getRequestURI()); 137 137 138 138 $config = array( 139 139 'mockID' => $mock->getID(),
+1 -1
src/applications/phortune/controller/payment/PhortunePaymentMethodCreateController.php
··· 143 143 "cart/{$cart_id}/checkout/?paymentMethodID=".$method->getID()); 144 144 } else if ($subscription_id) { 145 145 $next_uri = new PhutilURI($cancel_uri); 146 - $next_uri->setQueryParam('added', true); 146 + $next_uri->replaceQueryParam('added', true); 147 147 } else { 148 148 $account_uri = $this->getApplicationURI($account->getID().'/'); 149 149 $next_uri = new PhutilURI($account_uri);
+2 -2
src/applications/phortune/controller/subscription/PhortuneSubscriptionEditController.php
··· 118 118 119 119 $uri = $this->getApplicationURI($account->getID().'/card/new/'); 120 120 $uri = new PhutilURI($uri); 121 - $uri->setQueryParam('merchantID', $merchant->getID()); 122 - $uri->setQueryParam('subscriptionID', $subscription->getID()); 121 + $uri->replaceQueryParam('merchantID', $merchant->getID()); 122 + $uri->replaceQueryParam('subscriptionID', $subscription->getID()); 123 123 124 124 $add_method_button = phutil_tag( 125 125 'a',
+1 -1
src/applications/ponder/view/PonderAddAnswerView.php
··· 66 66 67 67 if (!$viewer->isLoggedIn()) { 68 68 $login_href = id(new PhutilURI('/auth/start/')) 69 - ->setQueryParam('next', '/Q'.$question->getID()); 69 + ->replaceQueryParam('next', '/Q'.$question->getID()); 70 70 $form = id(new PHUIFormLayoutView()) 71 71 ->addClass('login-to-participate') 72 72 ->appendChild(
+17 -13
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 284 284 $query_key = $saved_query->getQueryKey(); 285 285 286 286 $bulk_uri = new PhutilURI("/maniphest/bulk/query/{$query_key}/"); 287 - $bulk_uri->setQueryParam('board', $this->id); 287 + $bulk_uri->replaceQueryParam('board', $this->id); 288 288 289 289 return id(new AphrontRedirectResponse()) 290 290 ->setURI($bulk_uri); ··· 878 878 } 879 879 880 880 $uri = $this->getURIWithState($uri) 881 - ->setQueryParam('filter', null); 881 + ->removeQueryParam('filter'); 882 882 $item->setHref($uri); 883 883 884 884 $items[] = $item; ··· 966 966 967 967 if ($show_hidden) { 968 968 $hidden_uri = $this->getURIWithState() 969 - ->setQueryParam('hidden', null); 969 + ->removeQueryParam('hidden'); 970 970 $hidden_icon = 'fa-eye-slash'; 971 971 $hidden_text = pht('Hide Hidden Columns'); 972 972 } else { 973 973 $hidden_uri = $this->getURIWithState() 974 - ->setQueryParam('hidden', 'true'); 974 + ->replaceQueryParam('hidden', 'true'); 975 975 $hidden_icon = 'fa-eye'; 976 976 $hidden_text = pht('Show Hidden Columns'); 977 977 } ··· 999 999 ->setHref($manage_uri); 1000 1000 1001 1001 $batch_edit_uri = $request->getRequestURI(); 1002 - $batch_edit_uri->setQueryParam('batch', self::BATCH_EDIT_ALL); 1002 + $batch_edit_uri->replaceQueryParam('batch', self::BATCH_EDIT_ALL); 1003 1003 $can_batch_edit = PhabricatorPolicyFilter::hasCapability( 1004 1004 $viewer, 1005 1005 PhabricatorApplication::getByClass('PhabricatorManiphestApplication'), ··· 1090 1090 } 1091 1091 1092 1092 $batch_edit_uri = $request->getRequestURI(); 1093 - $batch_edit_uri->setQueryParam('batch', $column->getID()); 1093 + $batch_edit_uri->replaceQueryParam('batch', $column->getID()); 1094 1094 $can_batch_edit = PhabricatorPolicyFilter::hasCapability( 1095 1095 $viewer, 1096 1096 PhabricatorApplication::getByClass('PhabricatorManiphestApplication'), ··· 1103 1103 ->setDisabled(!$can_batch_edit); 1104 1104 1105 1105 $batch_move_uri = $request->getRequestURI(); 1106 - $batch_move_uri->setQueryParam('move', $column->getID()); 1106 + $batch_move_uri->replaceQueryParam('move', $column->getID()); 1107 1107 $column_items[] = id(new PhabricatorActionView()) 1108 1108 ->setIcon('fa-arrow-right') 1109 1109 ->setName(pht('Move Tasks to Column...')) ··· 1111 1111 ->setWorkflow(true); 1112 1112 1113 1113 $query_uri = $request->getRequestURI(); 1114 - $query_uri->setQueryParam('queryColumnID', $column->getID()); 1114 + $query_uri->replaceQueryParam('queryColumnID', $column->getID()); 1115 1115 1116 1116 $column_items[] = id(new PhabricatorActionView()) 1117 1117 ->setName(pht('View as Query')) ··· 1188 1188 $base = new PhutilURI($base); 1189 1189 1190 1190 if ($force || ($this->sortKey != $this->getDefaultSort($project))) { 1191 - $base->setQueryParam('order', $this->sortKey); 1191 + $base->replaceQueryParam('order', $this->sortKey); 1192 1192 } else { 1193 - $base->setQueryParam('order', null); 1193 + $base->removeQueryParam('order'); 1194 1194 } 1195 1195 1196 1196 if ($force || ($this->queryKey != $this->getDefaultFilter($project))) { 1197 - $base->setQueryParam('filter', $this->queryKey); 1197 + $base->replaceQueryParam('filter', $this->queryKey); 1198 1198 } else { 1199 - $base->setQueryParam('filter', null); 1199 + $base->removeQueryParam('filter'); 1200 1200 } 1201 1201 1202 - $base->setQueryParam('hidden', $this->showHidden ? 'true' : null); 1202 + if ($this->showHidden) { 1203 + $base->replaceQueryParam('hidden', 'true'); 1204 + } else { 1205 + $base->removeQueryParam('hidden'); 1206 + } 1203 1207 1204 1208 return $base; 1205 1209 }
+1 -1
src/applications/project/controller/PhabricatorProjectColumnHideController.php
··· 41 41 $view_uri = $this->getApplicationURI('/board/'.$project_id.'/'); 42 42 $view_uri = new PhutilURI($view_uri); 43 43 foreach ($request->getPassthroughRequestData() as $key => $value) { 44 - $view_uri->setQueryParam($key, $value); 44 + $view_uri->replaceQueryParam($key, $value); 45 45 } 46 46 47 47 if ($column->isDefaultColumn()) {
+1 -1
src/applications/project/controller/PhabricatorProjectDefaultController.php
··· 54 54 $view_uri = $this->getApplicationURI("board/{$id}/"); 55 55 $view_uri = new PhutilURI($view_uri); 56 56 foreach ($request->getPassthroughRequestData() as $key => $value) { 57 - $view_uri->setQueryParam($key, $value); 57 + $view_uri->replaceQueryParam($key, $value); 58 58 } 59 59 60 60 if ($request->isFormPost()) {
+1 -1
src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php
··· 96 96 private function buildReleephRequestURI(ReleephBranch $branch) { 97 97 $uri = $branch->getURI('request/'); 98 98 return id(new PhutilURI($uri)) 99 - ->setQueryParam('D', $this->revision->getID()); 99 + ->replaceQueryParam('D', $this->revision->getID()); 100 100 } 101 101 102 102 }
+2 -2
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 905 905 $engine = $this->getSearchEngine(); 906 906 $nux_uri = $engine->getQueryBaseURI(); 907 907 $nux_uri = id(new PhutilURI($nux_uri)) 908 - ->setQueryParam('nux', true); 908 + ->replaceQueryParam('nux', true); 909 909 910 910 $actions[] = id(new PhabricatorActionView()) 911 911 ->setIcon('fa-user-plus') ··· 915 915 916 916 if ($is_dev) { 917 917 $overheated_uri = $this->getRequest()->getRequestURI() 918 - ->setQueryParam('overheated', true); 918 + ->replaceQueryParam('overheated', true); 919 919 920 920 $actions[] = id(new PhabricatorActionView()) 921 921 ->setIcon('fa-fire')
+1 -1
src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
··· 219 219 220 220 foreach ($providers as $provider_phid => $provider) { 221 221 $provider_uri = id(new PhutilURI($this->getPanelURI())) 222 - ->setQueryParam('providerPHID', $provider_phid); 222 + ->replaceQueryParam('providerPHID', $provider_phid); 223 223 224 224 $is_enabled = $provider->canCreateNewConfiguration($viewer); 225 225
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 198 198 $viewer = $this->getViewer(); 199 199 if (!$viewer->isLoggedIn()) { 200 200 $uri = id(new PhutilURI('/login/')) 201 - ->setQueryParam('next', (string)$this->getRequestURI()); 201 + ->replaceQueryParam('next', (string)$this->getRequestURI()); 202 202 return id(new PHUIObjectBoxView()) 203 203 ->setFlush(true) 204 204 ->appendChild(
+7 -5
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
··· 126 126 $results = array_slice($results, 0, $limit, $preserve_keys = true); 127 127 if (($offset + (2 * $limit)) < $hard_limit) { 128 128 $next_uri = id(new PhutilURI($request->getRequestURI())) 129 - ->setQueryParam('offset', $offset + $limit) 130 - ->setQueryParam('q', $query) 131 - ->setQueryParam('raw', $raw_query) 132 - ->setQueryParam('format', 'html'); 129 + ->replaceQueryParam('offset', $offset + $limit) 130 + ->replaceQueryParam('q', $query) 131 + ->replaceQueryParam('raw', $raw_query) 132 + ->replaceQueryParam('format', 'html'); 133 133 134 134 $next_link = javelin_tag( 135 135 'a', ··· 248 248 $parameters = $source->getParameters(); 249 249 if ($parameters) { 250 250 $reference_uri = (string)id(new PhutilURI($reference_uri)) 251 - ->setQueryParam('parameters', phutil_json_encode($parameters)); 251 + ->replaceQueryParam( 252 + 'parameters', 253 + phutil_json_encode($parameters)); 252 254 } 253 255 254 256 $reference_link = phutil_tag(
+11 -5
src/infrastructure/env/PhabricatorEnv.php
··· 475 475 * @task read 476 476 */ 477 477 public static function getDoclink($resource, $type = 'article') { 478 - $uri = new PhutilURI('https://secure.phabricator.com/diviner/find/'); 479 - $uri->setQueryParam('name', $resource); 480 - $uri->setQueryParam('type', $type); 481 - $uri->setQueryParam('jump', true); 482 - return (string)$uri; 478 + $params = array( 479 + 'name' => $resource, 480 + 'type' => $type, 481 + 'jump' => true, 482 + ); 483 + 484 + $uri = new PhutilURI( 485 + 'https://secure.phabricator.com/diviner/find/', 486 + $params); 487 + 488 + return phutil_string_cast($uri); 483 489 } 484 490 485 491
+2 -2
src/view/phui/PHUITimelineView.php
··· 154 154 } 155 155 156 156 $uri = $this->getPager()->getNextPageURI(); 157 - $uri->setQueryParam('quoteTargetID', $this->getQuoteTargetID()); 158 - $uri->setQueryParam('quoteRef', $this->getQuoteRef()); 157 + $uri->replaceQueryParam('quoteTargetID', $this->getQuoteTargetID()); 158 + $uri->replaceQueryParam('quoteRef', $this->getQuoteRef()); 159 159 $events[] = javelin_tag( 160 160 'div', 161 161 array(