jenkins-bot has submitted this change and it was merged.
Change subject: Pass all non-default values as hidden field in namespace form
on Special:Watchlist
......................................................................
Pass all non-default values as hidden field in namespace form on
Special:Watchlist
Except 'namespace', 'invert' and 'associated' which are displayed in the form.
This allows to forward all parameters that were modified using query string,
e.g.
the new 'extended' parameter added in I115544005a621ee01a0ed0970a13099af92f42e7
that would be lost otherwise when using the form.
Change-Id: Idb0d3b1d6b4827d35ac9b09eb4d8a5ae630a0e3a
---
M includes/specials/SpecialWatchlist.php
1 file changed, 7 insertions(+), 5 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index 7033de6..2132b65 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -333,6 +333,11 @@
$links[] = $this->showHideLink( $nondefaults, $msg,
$name, $values[$name] );
}
+ $hiddenFields = $nondefaults;
+ unset( $hiddenFields['namespace'] );
+ unset( $hiddenFields['invert'] );
+ unset( $hiddenFields['associated'] );
+
# Namespace filter and put the whole form together.
$form .= $wlInfo;
$form .= $cutofflinks;
@@ -365,11 +370,8 @@
array( 'title' => $this->msg(
'tooltip-namespace_association' )->text() )
) . ' ';
$form .= Xml::submitButton( $this->msg( 'allpagessubmit'
)->text() ) . '</p>';
- $form .= Html::hidden( 'days', $values['days'] );
- foreach ( $filters as $key => $msg ) {
- if ( $values[$key] ) {
- $form .= Html::hidden( $key, 1 );
- }
+ foreach ( $hiddenFields as $key => $value ) {
+ $form .= Html::hidden( $key, $value );
}
$form .= Xml::closeElement( 'form' );
$form .= Xml::closeElement( 'fieldset' );
--
To view, visit https://gerrit.wikimedia.org/r/49622
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idb0d3b1d6b4827d35ac9b09eb4d8a5ae630a0e3a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits