http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88550
Revision: 88550
Author: reedy
Date: 2011-05-21 22:32:04 +0000 (Sat, 21 May 2011)
Log Message:
-----------
* (bug 29033) Filter is lost when I'm submitting the search form
Modified Paths:
--------------
trunk/extensions/CodeReview/ui/CodeRevisionListView.php
Modified: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
===================================================================
--- trunk/extensions/CodeReview/ui/CodeRevisionListView.php 2011-05-21
21:08:50 UTC (rev 88549)
+++ trunk/extensions/CodeReview/ui/CodeRevisionListView.php 2011-05-21
22:32:04 UTC (rev 88550)
@@ -64,13 +64,12 @@
return;
}
- $pathForm = $this->showForm();
-
// Get the total count across all pages
$dbr = wfGetDB( DB_SLAVE );
$revCount = $this->getRevCount( $dbr );
$pager = $this->getPager();
+ $pathForm = $this->showForm( $pager->getHiddenFields( array(
'path' ) ) );
// Build batch change interface as needed
$this->batchForm = $wgUser->isAllowed( 'codereview-set-status'
) ||
@@ -182,15 +181,12 @@
}
/**
+ * @param $hidden string
+ *
* @return string
*/
- function showForm() {
+ function showForm( $hidden = '' ) {
global $wgScript;
- if ( $this->mAuthor ) {
- $special = SpecialPage::getTitleFor( 'Code',
$this->mRepo->getName() . '/author/' . $this->mAuthor );
- } else {
- $special = SpecialPage::getTitleFor( 'Code',
$this->mRepo->getName() . '/path' );
- }
$ret = Xml::openElement( 'form', array( 'action' => $wgScript,
'method' => 'get' ) ) .
"<fieldset><legend>" . wfMsgHtml(
'code-pathsearch-legend' ) . "</legend>" .
@@ -204,11 +200,11 @@
Xml::label( wfMsg( 'code-pathsearch-filter' ),
'revFilter' ) . ' <strong>' .
Xml::span( $this->mAppliedFilter, '' ) .
'</strong> ' .
Xml::submitButton( wfMsg(
'code-revfilter-clear' ) ) .
- '</td>' .
- Html::hidden( 'title',
SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ) );
- } else {
- $ret .= Html::hidden( 'title',
$special->getPrefixedDBKey() ) ;
+ '</td>';
}
+
+ $ret .= $hidden;
+
$ret .= "</tr></table></fieldset></form>" ;
return $ret;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs