Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/80719
Change subject: Fix form submission on Special:RandomInCategory ...................................................................... Fix form submission on Special:RandomInCategory You can't have parameters in the action for GET forms, browsers are going to trim them off. This is the way passing title in handled on other special pages, e.g. Special:Contributions. Change-Id: I00728a085641b8a6cda50a55ad1e9b1de68b97bc --- M includes/specials/SpecialRandomInCategory.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/80719/1 diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index fd554e6..d7f56ed 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -68,6 +68,8 @@ } public function execute( $par ) { + global $wgScript; + $cat = false; $categoryStr = $this->getRequest()->getText( 'category', $par ); @@ -99,7 +101,8 @@ $submit = Html::input( '', $submitText, 'submit' ); $msg = $this->msg( 'randomincategory-selectcategory' ); - $form = Html::rawElement( 'form', array( 'action' => $this->getTitle()->getLocalUrl() ), + $form = Html::rawElement( 'form', array( 'action' => $wgScript ), + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . $msg->rawParams( $input, $submit )->parse() ); $this->getOutput()->addHtml( $form ); -- To view, visit https://gerrit.wikimedia.org/r/80719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00728a085641b8a6cda50a55ad1e9b1de68b97bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits