Page MenuHomePhabricator

Fix combobox submit not working in transcluded drilldown
Closed, ResolvedPublic

Description

When the drilldown is transcluded, the submit button of comboboxes will not redirect to the correct special page url.

This has been fixed with this patch:

Index: specials/SD_BrowseData.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- specials/SD_BrowseData.php	(revision 15a7b6823de5c6ec6f9d54244feb6cb024216dca)
+++ specials/SD_BrowseData.php	(revision )
@@ -831,6 +831,8 @@
 
 	function printComboBoxInput( $filter_name, $instance_num, $filter_values, $cur_value = null ) {
 		$filter_name = str_replace( ' ', '_', $filter_name );
+		$filter_url = $this->makeBrowseURL( $this->category, $this->applied_filters, $this->subcategory );
+
 		// URL-decode the filter name - necessary if it contains
 		// any non-Latin characters.
 		$filter_name = urldecode( $filter_name );
@@ -842,7 +844,7 @@
 		$inputName = "_search_$filter_name";
 
 		$text =<<< END
-<form method="get">
+<form method="get" action="$filter_url" >
 
 END;
 
@@ -878,7 +880,10 @@
 
 END;
 
-		$text .= Html::input( null, wfMessage( 'searchresultshead' )->text(), 'submit', array( 'style' => 'margin: 4px 0 8px 0;' ) ) . "\n";
+		$text .= Html::input(
+				null, wfMessage( 'searchresultshead' )->text(),
+				'submit', array( 'style' => 'margin: 4px 0 8px 0;' )
+		) . "\n";
 		$text .= "</form>\n";
 		return $text;
 	}