Back out unreviewed commit 17d23282dd6d8b1bf6b1b80f97cf02265cbec59d
[lhc/web/wiklou.git] / includes / specials / SpecialFilepath.php
index 3effa52..e086650 100644 (file)
@@ -39,7 +39,7 @@ class SpecialFilepath extends SpecialPage {
                $request = $this->getRequest();
                $file = !is_null( $par ) ? $par : $request->getText( 'file' );
 
-               $title = Title::makeTitleSafe( NS_FILE, $file );
+               $title = Title::newFromText( $file, NS_FILE );
 
                if ( ! $title instanceof Title || $title->getNamespace() != NS_FILE ) {
                        $this->showForm( $title );
@@ -78,10 +78,10 @@ class SpecialFilepath extends SpecialPage {
                $this->getOutput()->addHTML(
                        Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' ) ) .
                        Html::openElement( 'fieldset' ) .
-                       Html::element( 'legend', null, wfMsg( 'filepath' ) ) .
+                       Html::element( 'legend', null, $this->msg( 'filepath' )->text() ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
-                       Xml::inputLabel( wfMsg( 'filepath-page' ), 'file', 'file', 25, is_object( $title ) ? $title->getText() : '' ) . ' ' .
-                       Xml::submitButton( wfMsg( 'filepath-submit' ) ) . "\n" .
+                       Xml::inputLabel( $this->msg( 'filepath-page' )->text(), 'file', 'file', 25, is_object( $title ) ? $title->getText() : '' ) . ' ' .
+                       Xml::submitButton( $this->msg( 'filepath-submit' )->text() ) . "\n" .
                        Html::closeElement( 'fieldset' ) .
                        Html::closeElement( 'form' )
                );