From: Albert221 Date: Fri, 11 Dec 2015 21:50:55 +0000 (+0100) Subject: Resolve code invoking Title::newFromURL X-Git-Tag: 1.31.0-rc.0~8723^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=f1d8e12c50ec6b9497b8d2c5dac093b93ddb6765;p=lhc%2Fweb%2Fwiklou.git Resolve code invoking Title::newFromURL Bug: T65424 Change-Id: I6c97245faccd8b34557eb3be4150867fd9b37992 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ea85358c6b..fea667e850 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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; diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 3ea56c66a4..8de4e2f5e0 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -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)' . diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index ef1fd73c63..f11ed9a362 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -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; diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 00c8e050ea..6b7c0387b6 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -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(), diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index e94758664b..7da00a36d3 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -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( '
' . $this->msg( 'allpagesbadtitle' ) ->parse() . '
' ); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 4c79c926f2..0e0b9df335 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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' ); diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 0e5ffce4ff..f46f570e60 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -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() );