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

Fix a couple more "URI->alter()" callsites in paging code

Summary: `grep` had a hard time finding these.

Test Plan: Will just hotfix this since I'm still reasonably in the deploy window, this currently fatals: <https://secure.phabricator.com/search/query/_dgatshiRBSy/#R>

Reviewers: amckinley

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

+18 -5
+18 -5
src/view/phui/PHUIPagerView.php
··· 187 187 foreach ($pager_index as $key => $index) { 188 188 if ($index !== null) { 189 189 $display_index = $this->getDisplayIndex($index); 190 - $pager_links[$key] = (string)$base_uri->alter( 191 - $parameter, 192 - $display_index); 190 + 191 + $uri = id(clone $base_uri); 192 + if ($display_index === null) { 193 + $uri->removeQueryParam($parameter); 194 + } else { 195 + $uri->replaceQueryParam($parameter, $display_index); 196 + } 197 + 198 + $pager_links[$key] = phutil_string_cast($uri); 193 199 } 194 200 } 195 201 Javelin::initBehavior('phabricator-keyboard-pager', $pager_links); ··· 200 206 foreach ($links as $link) { 201 207 list($index, $label, $class) = $link; 202 208 $display_index = $this->getDisplayIndex($index); 203 - $link = $base_uri->alter($parameter, $display_index); 209 + 210 + $uri = id(clone $base_uri); 211 + if ($display_index === null) { 212 + $uri->removeQueryParam($parameter); 213 + } else { 214 + $uri->replaceQueryParam($parameter, $display_index); 215 + } 216 + 204 217 $rendered_links[] = id(new PHUIButtonView()) 205 218 ->setTag('a') 206 - ->setHref($link) 219 + ->setHref($uri) 207 220 ->setColor(PHUIButtonView::GREY) 208 221 ->addClass('mml') 209 222 ->addClass($class)