From: umherirrender Date: Wed, 8 Aug 2012 20:07:34 +0000 (+0200) Subject: Fix title inside form on Special:ListFiles X-Git-Tag: 1.31.0-rc.0~22793 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=e1284b221211dd9b1427caa6ddbeef7e6214b18f;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ); + } }