From e1284b221211dd9b1427caa6ddbeef7e6214b18f Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 8 Aug 2012 22:07:34 +0200 Subject: [PATCH] Fix title inside form on Special:ListFiles The form reused the title from the query, but when calling the page with a subpage as parameter (Special:ListFiles/User), than the title contains this subpage also, that looks not good, when resubmit the form. This way is a copy from Special:AllMessages. Change-Id: I431be530ad65e36c26c5a02fe78e436254131592 --- includes/specials/SpecialListfiles.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index ddab164b70..e5aed18262 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -254,8 +254,9 @@ class ImageListPager extends TablePager { return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) . Xml::fieldset( $this->msg( 'listfiles' )->text() ) . + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) . - $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) . + $this->getHiddenFields( array( 'limit', 'ilsearch', 'user', 'title' ) ) . Html::closeElement( 'fieldset' ) . Html::closeElement( 'form' ) . "\n"; } @@ -290,4 +291,8 @@ class ImageListPager extends TablePager { } return $queries; } + + function getTitle() { + return SpecialPage::getTitleFor( 'Listfiles' ); + } } -- 2.20.1