mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
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
This commit is contained in:
parent
3058cae4b8
commit
dbcf41dbea
1 changed files with 18 additions and 5 deletions
|
@ -187,9 +187,15 @@ final class PHUIPagerView extends AphrontView {
|
|||
foreach ($pager_index as $key => $index) {
|
||||
if ($index !== null) {
|
||||
$display_index = $this->getDisplayIndex($index);
|
||||
$pager_links[$key] = (string)$base_uri->alter(
|
||||
$parameter,
|
||||
$display_index);
|
||||
|
||||
$uri = id(clone $base_uri);
|
||||
if ($display_index === null) {
|
||||
$uri->removeQueryParam($parameter);
|
||||
} else {
|
||||
$uri->replaceQueryParam($parameter, $display_index);
|
||||
}
|
||||
|
||||
$pager_links[$key] = phutil_string_cast($uri);
|
||||
}
|
||||
}
|
||||
Javelin::initBehavior('phabricator-keyboard-pager', $pager_links);
|
||||
|
@ -200,10 +206,17 @@ final class PHUIPagerView extends AphrontView {
|
|||
foreach ($links as $link) {
|
||||
list($index, $label, $class) = $link;
|
||||
$display_index = $this->getDisplayIndex($index);
|
||||
$link = $base_uri->alter($parameter, $display_index);
|
||||
|
||||
$uri = id(clone $base_uri);
|
||||
if ($display_index === null) {
|
||||
$uri->removeQueryParam($parameter);
|
||||
} else {
|
||||
$uri->replaceQueryParam($parameter, $display_index);
|
||||
}
|
||||
|
||||
$rendered_links[] = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setHref($link)
|
||||
->setHref($uri)
|
||||
->setColor(PHUIButtonView::GREY)
|
||||
->addClass('mml')
|
||||
->addClass($class)
|
||||
|
|
Loading…
Reference in a new issue