r55684 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55683‎ | r55684 | r55685 >
Date:19:41, 30 August 2009
Author:ialex
Status:ok
Tags:
Comment:
Use $wgScript rather than $this->getTitle()->getLocalURL() for the action parameter, since the title parameter is already present in the hidden fields and it doesn't work with ugly URLS
Reported by MaxSem on IRC.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialListfiles.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListfiles.php
@@ -158,10 +158,10 @@
159159 }
160160
161161 function getForm() {
162 - global $wgRequest, $wgMiserMode;
 162+ global $wgRequest, $wgScript, $wgMiserMode;
163163 $search = $wgRequest->getText( 'ilsearch' );
164164
165 - $s = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-listfiles-form' ) ) .
 165+ $s = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
166166 Xml::openElement( 'fieldset' ) .
167167 Xml::element( 'legend', null, wfMsg( 'listfiles' ) ) .
168168 Xml::tags( 'label', null, wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ) );

Status & tagging log