Resolve code invoking Title::newFromURL
authorAlbert221 <w.albert221@gmail.com>
Fri, 11 Dec 2015 21:50:55 +0000 (22:50 +0100)
committerAlbert221 <w.albert221@gmail.com>
Sat, 12 Dec 2015 11:00:37 +0000 (12:00 +0100)
Bug: T65424
Change-Id: I6c97245faccd8b34557eb3be4150867fd9b37992

includes/OutputPage.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialNewimages.php
includes/specials/SpecialRecentchangeslinked.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialWhatlinkshere.php

index ea85358..fea667e 100644 (file)
@@ -2439,7 +2439,7 @@ class OutputPage extends ContextSource {
                        # not especially useful as a returnto parameter. Use the title
                        # from the request instead, if there was one.
                        $request = $this->getRequest();
-                       $returnto = Title::newFromURL( $request->getVal( 'title', '' ) );
+                       $returnto = Title::newFromText( $request->getVal( 'title', '' ) );
                        if ( $action == 'edit' ) {
                                $msg = 'whitelistedittext';
                                $displayReturnto = $returnto;
index 3ea56c6..8de4e2f 100644 (file)
@@ -108,7 +108,7 @@ class ImageListPager extends TablePager {
 
                if ( $search !== '' && !$this->getConfig()->get( 'MiserMode' ) ) {
                        $this->mSearch = $search;
-                       $nt = Title::newFromURL( $this->mSearch );
+                       $nt = Title::newFromText( $this->mSearch );
 
                        if ( $nt ) {
                                $dbr = wfGetDB( DB_SLAVE );
@@ -147,7 +147,7 @@ class ImageListPager extends TablePager {
                }
 
                if ( $this->mSearch !== '' ) {
-                       $nt = Title::newFromURL( $this->mSearch );
+                       $nt = Title::newFromText( $this->mSearch );
                        if ( $nt ) {
                                $dbr = wfGetDB( DB_SLAVE );
                                $conds[] = 'LOWER(' . $prefix . '_name)' .
index ef1fd73..f11ed9a 100644 (file)
@@ -91,8 +91,8 @@ class SpecialMergeHistory extends SpecialPage {
 
                // target page
                if ( $this->mSubmitted ) {
-                       $this->mTargetObj = Title::newFromURL( $this->mTarget );
-                       $this->mDestObj = Title::newFromURL( $this->mDest );
+                       $this->mTargetObj = Title::newFromText( $this->mTarget );
+                       $this->mDestObj = Title::newFromText( $this->mDest );
                } else {
                        $this->mTargetObj = null;
                        $this->mDestObj = null;
index 00c8e05..6b7c038 100644 (file)
@@ -113,7 +113,7 @@ class NewFilesPager extends ReverseChronologicalPager {
 
                if ( !$this->getConfig()->get( 'MiserMode' ) && $this->like !== null ) {
                        $dbr = wfGetDB( DB_SLAVE );
-                       $likeObj = Title::newFromURL( $this->like );
+                       $likeObj = Title::newFromText( $this->like );
                        if ( $likeObj instanceof Title ) {
                                $like = $dbr->buildLike(
                                        $dbr->anyString(),
index e947586..7da00a3 100644 (file)
@@ -55,7 +55,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                        return false;
                }
                $outputPage = $this->getOutput();
-               $title = Title::newFromURL( $target );
+               $title = Title::newFromText( $target );
                if ( !$title || $title->isExternal() ) {
                        $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
                                        ->parse() . '</div>' );
index 4c79c92..0e0b9df 100644 (file)
@@ -700,7 +700,7 @@ class SpecialUndelete extends SpecialPage {
                $this->mTargetObj = null;
 
                if ( $this->mTarget !== null && $this->mTarget !== '' ) {
-                       $this->mTargetObj = Title::newFromURL( $this->mTarget );
+                       $this->mTargetObj = Title::newFromText( $this->mTarget );
                }
 
                $this->mSearchPrefix = $request->getText( 'prefix' );
index 0e5ffce..f46f570 100644 (file)
@@ -72,7 +72,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                // Bind to member variable
                $this->opts = $opts;
 
-               $this->target = Title::newFromURL( $opts->getValue( 'target' ) );
+               $this->target = Title::newFromText( $opts->getValue( 'target' ) );
                if ( !$this->target ) {
                        if ( !$this->including() ) {
                                $out->addHTML( $this->whatlinkshereForm() );