From df5265e14dffc7014e4f9cca9e8d08b07c2f87de Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 27 Mar 2013 14:36:05 +0100 Subject: [PATCH] Fix case of some Title methods Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338 --- includes/Article.php | 2 +- includes/ChangesFeed.php | 2 +- includes/EditPage.php | 4 ++-- includes/Export.php | 4 ++-- includes/FeedUtils.php | 2 +- includes/FileDeleteForm.php | 2 +- includes/Import.php | 2 +- includes/Linker.php | 2 +- includes/Metadata.php | 2 +- includes/ProtectionForm.php | 4 ++-- includes/SkinLegacy.php | 2 +- includes/SkinTemplate.php | 6 +++--- includes/SpecialPage.php | 2 +- includes/SpecialPageFactory.php | 2 +- includes/User.php | 2 +- includes/UserMailer.php | 14 +++++++------- includes/WikiMap.php | 2 +- includes/actions/HistoryAction.php | 10 +++++----- includes/actions/PurgeAction.php | 2 +- includes/api/ApiQuerySiteinfo.php | 2 +- includes/api/ApiRsd.php | 2 +- includes/diff/DifferenceEngine.php | 4 ++-- includes/filerepo/file/LocalFile.php | 2 +- includes/parser/Parser.php | 4 ++-- includes/specials/SpecialAllpages.php | 2 +- includes/specials/SpecialBlockList.php | 2 +- includes/specials/SpecialChangeEmail.php | 2 +- includes/specials/SpecialChangePassword.php | 2 +- includes/specials/SpecialConfirmemail.php | 2 +- includes/specials/SpecialExport.php | 2 +- includes/specials/SpecialImport.php | 2 +- includes/specials/SpecialNewpages.php | 2 +- includes/specials/SpecialPagesWithProp.php | 2 +- includes/specials/SpecialPasswordReset.php | 2 +- includes/specials/SpecialRandompage.php | 2 +- includes/specials/SpecialRecentchangeslinked.php | 2 +- includes/specials/SpecialRevisiondelete.php | 4 ++-- includes/specials/SpecialWatchlist.php | 8 ++++---- maintenance/dumpSisterSites.php | 2 +- maintenance/purgeList.php | 6 +++--- tests/phpunit/skins/SideBarTest.php | 4 ++-- 41 files changed, 65 insertions(+), 65 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 9b4afe44fc..793da7f75a 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1188,7 +1188,7 @@ class Article implements Page { } elseif ( $this->getContext()->getRequest()->getInt( 'unhide' ) != 1 ) { # Give explanation and add a link to view the revision... $oldid = intval( $this->getOldID() ); - $link = $this->getTitle()->getFullUrl( "oldid={$oldid}&unhide=1" ); + $link = $this->getTitle()->getFullURL( "oldid={$oldid}&unhide=1" ); $msg = $this->mRevision->isDeleted( Revision::DELETED_RESTRICTED ) ? 'rev-suppressed-text-unhide' : 'rev-deleted-text-unhide'; $outputPage->wrapWikiMsg( "\n", diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index ac6d3326d7..8b8b94e807 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -187,7 +187,7 @@ class ChangesFeed { foreach( $sorted as $obj ) { $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title ); - $talkpage = MWNamespace::canTalk( $obj->rc_namespace ) ? $title->getTalkPage()->getFullUrl() : ''; + $talkpage = MWNamespace::canTalk( $obj->rc_namespace ) ? $title->getTalkPage()->getFullURL() : ''; // Skip items with deleted content (avoids partially complete/inconsistent output) if( $obj->rc_deleted ) continue; diff --git a/includes/EditPage.php b/includes/EditPage.php index 8b2dbb5f9a..bbe7d794d9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -487,7 +487,7 @@ class EditPage { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. - $wgOut->redirect( $this->mTitle->getFullUrl() ); + $wgOut->redirect( $this->mTitle->getFullURL() ); return; } @@ -540,7 +540,7 @@ class EditPage { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. - $wgOut->redirect( $this->mTitle->getFullUrl() ); + $wgOut->redirect( $this->mTitle->getFullURL() ); } else { $wgOut->readOnlyPage( $source, $protected, $reasons, $action ); } diff --git a/includes/Export.php b/includes/Export.php index 8df7dcb39c..085662ac60 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -541,7 +541,7 @@ class XmlDumpWriter { * @return string */ function homelink() { - return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalUrl() ); + return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalURL() ); } /** @@ -838,7 +838,7 @@ class XmlDumpWriter { " " . $comment . "\n" . " " . Xml::element( 'filename', null, $file->getName() ) . "\n" . $archiveName . - " " . Xml::element( 'src', null, $file->getCanonicalUrl() ) . "\n" . + " " . Xml::element( 'src', null, $file->getCanonicalURL() ) . "\n" . " " . Xml::element( 'size', null, $file->getSize() ) . "\n" . " " . Xml::element( 'sha1base36', null, $file->getSha1() ) . "\n" . " " . Xml::element( 'rel', null, $file->getRel() ) . "\n" . diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index adc1f781fb..57d8c0bd8f 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -223,7 +223,7 @@ class FeedUtils { $queryParameters = ($oldid == null) ? "diff={$newid}" : "diff={$newid}&oldid={$oldid}"; - $diffUrl = $title->getFullUrl( $queryParameters ); + $diffUrl = $title->getFullURL( $queryParameters ); $diffLink = Html::element( 'a', array( 'href' => $diffUrl ), wfMessage( 'showdiff' )->inContentLanguage()->text() ); diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 28403ccacc..9ce2f76cd4 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -379,7 +379,7 @@ class FileDeleteForm { $q['oldimage'] = $this->oldimage; } - return $this->title->getLocalUrl( $q ); + return $this->title->getLocalURL( $q ); } /** diff --git a/includes/Import.php b/includes/Import.php index f33704392c..04d99e17fd 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1714,7 +1714,7 @@ class ImportStreamSource { if ( $history ) $params['history'] = 1; if ( $templates ) $params['templates'] = 1; if ( $pageLinkDepth ) $params['pagelink-depth'] = $pageLinkDepth; - $url = $link->getFullUrl( $params ); + $url = $link->getFullURL( $params ); # For interwikis, use POST to avoid redirects. return ImportStreamSource::newFromURL( $url, "POST" ); } diff --git a/includes/Linker.php b/includes/Linker.php index 4f1d10e58b..a347549dfd 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -971,7 +971,7 @@ class Linker { return wfAppendQuery( $wgUploadNavigationUrl, $q ); } else { $upload = SpecialPage::getTitleFor( 'Upload' ); - return $upload->getLocalUrl( $q ); + return $upload->getLocalURL( $q ); } } diff --git a/includes/Metadata.php b/includes/Metadata.php index 0b8014a7b4..96d00aea0d 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -107,7 +107,7 @@ abstract class RdfMetaData { * @param $title Title */ protected function page( $name, $title ) { - $this->url( $name, $title->getFullUrl() ); + $this->url( $name, $title->getFullURL() ); } protected function url( $name, $url ) { diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index d7b8840034..7ebefec3a6 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -191,7 +191,7 @@ class ProtectionForm { if( $wgRequest->wasPosted() ) { if( $this->save() ) { $q = $this->mArticle->isRedirect() ? 'redirect=no' : ''; - $wgOut->redirect( $this->mTitle->getFullUrl( $q ) ); + $wgOut->redirect( $this->mTitle->getFullURL( $q ) ); } } else { $this->show(); @@ -359,7 +359,7 @@ class ProtectionForm { if( !$this->disabled ) { $wgOut->addModules( 'mediawiki.legacy.protect' ); $out .= Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->mTitle->getLocalUrl( 'action=protect' ), + 'action' => $this->mTitle->getLocalURL( 'action=protect' ), 'id' => 'mw-Protect-Form', 'onsubmit' => 'ProtectionForm.enableUnchainedInputs(true)' ) ); } diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index b9766a9f7b..b17abc275e 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -531,7 +531,7 @@ class LegacyTemplate extends BaseTemplate { $s = array(); if ( !$wgOut->isPrintable() ) { - $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl( + $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalURL( $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) ); $s[] = "" . wfMessage( 'printableversion' )->text() . ''; diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 59e1ccff1d..7147ba97dd 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -742,7 +742,7 @@ class SkinTemplate extends Skin { return array( 'class' => implode( ' ', $classes ), 'text' => $text, - 'href' => $title->getLocalUrl( $query ), + 'href' => $title->getLocalURL( $query ), 'primary' => true ); } @@ -1203,7 +1203,7 @@ class SkinTemplate extends Skin { if ( $out->isArticleRelated() ) { $nav_urls['whatlinkshere'] = array( - 'href' => SpecialPage::getTitleFor( 'Whatlinkshere', $this->thispage )->getLocalUrl() + 'href' => SpecialPage::getTitleFor( 'Whatlinkshere', $this->thispage )->getLocalURL() ); $nav_urls['info'] = array( @@ -1213,7 +1213,7 @@ class SkinTemplate extends Skin { if ( $this->getTitle()->getArticleID() ) { $nav_urls['recentchangeslinked'] = array( - 'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalUrl() + 'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalURL() ); } } diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index c32738f8b6..38b7d3ecc5 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -1090,7 +1090,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { $query = $this->getRedirectQuery(); // Redirect to a page title with possible query parameters if ( $redirect instanceof Title ) { - $url = $redirect->getFullUrl( $query ); + $url = $redirect->getFullURL( $query ); $this->getOutput()->redirect( $url ); return $redirect; // Redirect to index.php with query parameters diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index 7c639d0a6a..a53b901256 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -465,7 +465,7 @@ class SpecialPageFactory { unset( $query['title'] ); $query = wfArrayToCgi( $query ); $title = $page->getTitle( $par ); - $url = $title->getFullUrl( $query ); + $url = $title->getFullURL( $query ); $context->getOutput()->redirect( $url ); wfProfileOut( __METHOD__ ); return $title; diff --git a/includes/User.php b/includes/User.php index 0e63704cd9..cc97774daf 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3663,7 +3663,7 @@ class User { protected function getTokenUrl( $page, $token ) { // Hack to bypass localization of 'Special:' $title = Title::makeTitle( NS_MAIN, "Special:$page/$token" ); - return $title->getCanonicalUrl(); + return $title->getCanonicalURL(); } /** diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 6eb9917262..c5dcfc3a75 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -696,20 +696,20 @@ class EmailNotification { $keys = array(); $postTransformKeys = array(); - $pageTitleUrl = $this->title->getCanonicalUrl(); + $pageTitleUrl = $this->title->getCanonicalURL(); $pageTitle = $this->title->getPrefixedText(); if ( $this->oldid ) { // Always show a link to the diff which triggered the mail. See bug 32210. $keys['$NEWPAGE'] = "\n\n" . wfMessage( 'enotif_lastdiff', - $this->title->getCanonicalUrl( 'diff=next&oldid=' . $this->oldid ) ) + $this->title->getCanonicalURL( 'diff=next&oldid=' . $this->oldid ) ) ->inContentLanguage()->text(); if ( !$wgEnotifImpersonal ) { // For personal mail, also show a link to the diff of all changes // since last visited. $keys['$NEWPAGE'] .= "\n\n" . wfMessage( 'enotif_lastvisited', - $this->title->getCanonicalUrl( 'diff=0&oldid=' . $this->oldid ) ) + $this->title->getCanonicalURL( 'diff=0&oldid=' . $this->oldid ) ) ->inContentLanguage()->text(); } $keys['$OLDID'] = $this->oldid; @@ -724,10 +724,10 @@ class EmailNotification { } $keys['$PAGETITLE'] = $this->title->getPrefixedText(); - $keys['$PAGETITLE_URL'] = $this->title->getCanonicalUrl(); + $keys['$PAGETITLE_URL'] = $this->title->getCanonicalURL(); $keys['$PAGEMINOREDIT'] = $this->minorEdit ? wfMessage( 'minoredit' )->inContentLanguage()->text() : ''; - $keys['$UNWATCHURL'] = $this->title->getCanonicalUrl( 'action=unwatch' ); + $keys['$UNWATCHURL'] = $this->title->getCanonicalURL( 'action=unwatch' ); if ( $this->editor->isAnon() ) { # real anon (user:xxx.xxx.xxx.xxx) @@ -738,10 +738,10 @@ class EmailNotification { } else { $keys['$PAGEEDITOR'] = $wgEnotifUseRealName ? $this->editor->getRealName() : $this->editor->getName(); $emailPage = SpecialPage::getSafeTitleFor( 'Emailuser', $this->editor->getName() ); - $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getCanonicalUrl(); + $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getCanonicalURL(); } - $keys['$PAGEEDITOR_WIKI'] = $this->editor->getUserPage()->getCanonicalUrl(); + $keys['$PAGEEDITOR_WIKI'] = $this->editor->getUserPage()->getCanonicalURL(); # Replace this after transforming the message, bug 35019 $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary; diff --git a/includes/WikiMap.php b/includes/WikiMap.php index 4697b12789..a1dbbfc098 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -211,7 +211,7 @@ class WikiReference { } /** - * Get a URL based on $wgServer, like Title::getFullUrl() would produce + * Get a URL based on $wgServer, like Title::getFullURL() would produce * when called locally on the wiki. * * @param string $page page name (must be normalized before calling this function!) diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index f2e61a5c04..909bd4919d 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -256,7 +256,7 @@ class HistoryAction extends FormlessAction { $this->getTitle()->getPrefixedText() . ' - ' . $this->msg( 'history-feed-title' )->inContentLanguage()->text(), $this->msg( 'history-feed-description' )->inContentLanguage()->text(), - $this->getTitle()->getFullUrl( 'action=history' ) + $this->getTitle()->getFullURL( 'action=history' ) ); // Get a limit on number of feed entries. Provide a sane default @@ -283,10 +283,10 @@ class HistoryAction extends FormlessAction { return new FeedItem( $this->msg( 'nohistory' )->inContentLanguage()->text(), $this->msg( 'history-feed-empty' )->inContentLanguage()->parseAsBlock(), - $this->getTitle()->getFullUrl(), + $this->getTitle()->getFullURL(), wfTimestamp( TS_MW ), '', - $this->getTitle()->getTalkPage()->getFullUrl() + $this->getTitle()->getTalkPage()->getFullURL() ); } @@ -323,10 +323,10 @@ class HistoryAction extends FormlessAction { return new FeedItem( $title, $text, - $this->getTitle()->getFullUrl( 'diff=' . $rev->getId() . '&oldid=prev' ), + $this->getTitle()->getFullURL( 'diff=' . $rev->getId() . '&oldid=prev' ), $rev->getTimestamp(), $rev->getUserText(), - $this->getTitle()->getTalkPage()->getFullUrl() + $this->getTitle()->getTalkPage()->getFullURL() ); } } diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php index 00bb961df6..82cdc79ac9 100644 --- a/includes/actions/PurgeAction.php +++ b/includes/actions/PurgeAction.php @@ -96,6 +96,6 @@ class PurgeAction extends FormAction { } public function onSuccess() { - $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->redirectParams ) ); + $this->getOutput()->redirect( $this->getTitle()->getFullURL( $this->redirectParams ) ); } } diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 1488b2d1da..f79083e12f 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -121,7 +121,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data = array(); $mainPage = Title::newMainPage(); $data['mainpage'] = $mainPage->getPrefixedText(); - $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_CURRENT ); + $data['base'] = wfExpandUrl( $mainPage->getFullURL(), PROTO_CURRENT ); $data['sitename'] = $GLOBALS['wgSitename']; $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}"; $data['phpversion'] = phpversion(); diff --git a/includes/api/ApiRsd.php b/includes/api/ApiRsd.php index c4a1328ccb..d219c91c4c 100644 --- a/includes/api/ApiRsd.php +++ b/includes/api/ApiRsd.php @@ -40,7 +40,7 @@ class ApiRsd extends ApiBase { $service = array( 'apis' => $this->formatRsdApiList() ); ApiResult::setContent( $service, 'MediaWiki', 'engineName' ); ApiResult::setContent( $service, 'https://www.mediawiki.org/', 'engineLink' ); - ApiResult::setContent( $service, Title::newMainPage()->getCanonicalUrl(), 'homePageLink' ); + ApiResult::setContent( $service, Title::newMainPage()->getCanonicalURL(), 'homePageLink' ); $result->setIndexedTagName( $service['apis'], 'api' ); diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 0f3c77ffbf..d44c05032b 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -304,7 +304,7 @@ class DifferenceEngine extends ContextSource { } if ( !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) { $undoLink = Html::element( 'a', array( - 'href' => $this->mNewPage->getLocalUrl( array( + 'href' => $this->mNewPage->getLocalURL( array( 'action' => 'edit', 'undoafter' => $this->mOldid, 'undo' => $this->mNewid ) ), @@ -414,7 +414,7 @@ class DifferenceEngine extends ContextSource { array( $msg ) ); } else { # Give explanation and add a link to view the diff... - $link = $this->getTitle()->getFullUrl( $this->getRequest()->appendQueryValue( 'unhide', '1', true ) ); + $link = $this->getTitle()->getFullURL( $this->getRequest()->appendQueryValue( 'unhide', '1', true ) ); $msg = $suppressed ? 'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff'; $out->wrapWikiMsg( "\n", array( $msg, $link ) ); } diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 639228b97e..6ff898e2ef 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1590,7 +1590,7 @@ class LocalFile extends File { * @return String */ function getDescriptionUrl() { - return $this->title->getLocalUrl(); + return $this->title->getLocalURL(); } /** diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 62e76c5ebe..9176f6ade2 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1252,7 +1252,7 @@ class Parser { )); $titleObj = SpecialPage::getTitleFor( 'Booksources', $num ); return'ISBN $isbn"; } else { return $m[0]; @@ -3775,7 +3775,7 @@ class Parser { return wfMessage( 'scarytranscludedisabled' )->inContentLanguage()->text(); } - $url = $title->getFullUrl( "action=$action" ); + $url = $title->getFullURL( "action=$action" ); if ( strlen( $url ) > 255 ) { return wfMessage( 'scarytranscludetoolong' )->inContentLanguage()->text(); diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index f8b6d4ec51..942b767216 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -325,7 +325,7 @@ class SpecialAllpages extends IncludableSpecialPage { } $link = htmlspecialchars( - $this->getTitle()->getLocalUrl( $queryParams ) ); + $this->getTitle()->getLocalURL( $queryParams ) ); $out = $this->msg( 'alphaindexline' )->rawParams( "$inpointf", diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 17cc327e6f..eb25eafb16 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -58,7 +58,7 @@ class SpecialBlockList extends SpecialPage { if ( $action == 'unblock' || $action == 'submit' && $request->wasPosted() ) { # B/C @since 1.18: Unblock interface is now at Special:Unblock $title = SpecialPage::getTitleFor( 'Unblock', $this->target ); - $out->redirect( $title->getFullUrl() ); + $out->redirect( $title->getFullURL() ); return; } diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index 9ffbdf0f9d..2086fd3888 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -141,7 +141,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl(), + 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-changeemail-form' ) ) . "\n" . Html::hidden( 'token', $user->getEditToken() ) . "\n" . Html::hidden( 'returnto', $this->getRequest()->getVal( 'returnto' ) ) . "\n" . diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index 09531b2b00..95fbb0d632 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -162,7 +162,7 @@ class SpecialChangePassword extends UnlistedSpecialPage { Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl(), + 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-resetpass-form' ) ) . "\n" . $hiddenFieldsStr . $this->msg( 'resetpass_text' )->parseAsBlock() . "\n" . diff --git a/includes/specials/SpecialConfirmemail.php b/includes/specials/SpecialConfirmemail.php index 078c3865c3..0c98d37c71 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -98,7 +98,7 @@ class EmailConfirmation extends UnlistedSpecialPage { $out->wrapWikiMsg( "
\n$1\n
", 'confirmemail_pending' ); } $out->addWikiMsg( 'confirmemail_text' ); - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL() ) ); $form .= Html::hidden( 'token', $user->getEditToken() ); $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() ); $form .= Xml::closeElement( 'form' ); diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 7abfefe210..ed3321e390 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -187,7 +187,7 @@ class SpecialExport extends SpecialPage { $out->addWikiMsg( 'exporttext' ); $form = Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ) ) ); + 'action' => $this->getTitle()->getLocalURL( 'action=submit' ) ) ); $form .= Xml::inputLabel( $this->msg( 'export-addcattext' )->text(), 'catname', 'catname', 40 ) . ' '; $form .= Xml::submitButton( $this->msg( 'export-addcat' )->text(), array( 'name' => 'addcat' ) ) . '
'; diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index aa56041bbc..fc6172ff26 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -182,7 +182,7 @@ class SpecialImport extends SpecialPage { private function showForm() { global $wgImportSources, $wgExportMaxLinkDepth; - $action = $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ); + $action = $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ); $user = $this->getUser(); $out = $this->getOutput(); diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index ebb3021d28..eefc1b7489 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -419,7 +419,7 @@ class SpecialNewpages extends IncludableSpecialPage { $feed = new $wgFeedClasses[$type]( $this->feedTitle(), $this->msg( 'tagline' )->text(), - $this->getTitle()->getFullUrl() + $this->getTitle()->getFullURL() ); $pager = new NewPagesPager( $this, $this->opts ); diff --git a/includes/specials/SpecialPagesWithProp.php b/includes/specials/SpecialPagesWithProp.php index 8f8c981edc..dc6464a068 100644 --- a/includes/specials/SpecialPagesWithProp.php +++ b/includes/specials/SpecialPagesWithProp.php @@ -70,7 +70,7 @@ class SpecialPagesWithProp extends QueryPage { ), ), $this->getContext() ); $form->setMethod( 'get' ); - $form->setAction( $this->getTitle()->getFullUrl() ); + $form->setAction( $this->getTitle()->getFullURL() ); $form->setSubmitCallback( array( $this, 'onSubmit' ) ); $form->setWrapperLegend( $this->msg( 'pageswithprop-legend' ) ); $form->addHeaderText( $this->msg( 'pageswithprop-text' )->parseAsBlock() ); diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 90b0ac802c..491fadc78e 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -249,7 +249,7 @@ class SpecialPasswordReset extends FormSpecialPage { $username, $passwordBlock, count( $passwords ), - '<' . Title::newMainPage()->getCanonicalUrl() . '>', + '<' . Title::newMainPage()->getCanonicalURL() . '>', round( $wgNewPasswordExpiry / 86400 ) ); diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index ba5a4ac586..2b25b78b7a 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -72,7 +72,7 @@ class RandomPage extends SpecialPage { $redirectParam = $this->isRedirect() ? array( 'redirect' => 'no' ) : array(); $query = array_merge( $this->getRequest()->getValues(), $redirectParam ); unset( $query['title'] ); - $this->getOutput()->redirect( $title->getFullUrl( $query ) ); + $this->getOutput()->redirect( $title->getFullURL( $query ) ); } /** diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 99dac8fa54..bdeb770a76 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -56,7 +56,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { $this->msg( 'recentchangeslinked-title', $this->getTargetTitle()->getPrefixedText() ) ->inContentLanguage()->text(), $this->msg( 'recentchangeslinked-feed' )->inContentLanguage()->text(), - $this->getTitle()->getFullUrl() + $this->getTitle()->getFullURL() ); return array( $feed, $feedObj ); } diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index d23e812eb4..3a7399ae94 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -312,7 +312,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $this->getOutput()->addHTML( Xml::openElement( 'form', array( 'method' => 'POST', - 'action' => $this->getTitle()->getLocalUrl( + 'action' => $this->getTitle()->getLocalURL( 'target=' . urlencode( $this->targetObj->getPrefixedDBkey() ) . '&file=' . urlencode( $archiveName ) . '&token=' . urlencode( $user->getEditToken( $archiveName ) ) ) @@ -393,7 +393,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { // Show form if the user can submit if( $this->mIsAllowed ) { $out = Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ), + 'action' => $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ), 'id' => 'mw-revdel-form-revisions' ) ) . Xml::fieldset( $this->msg( 'revdelete-legend' )->text() ) . $this->buildCheckBoxes() . diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index afea377554..170c3931b8 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -87,7 +87,7 @@ class SpecialWatchlist extends SpecialPage { $mode = null; } $title = SpecialPage::getTitleFor( 'EditWatchlist', $mode ); - $output->redirect( $title->getLocalUrl() ); + $output->redirect( $title->getLocalURL() ); return; } @@ -181,7 +181,7 @@ class SpecialWatchlist extends SpecialPage { $request->wasPosted() ) { $user->clearAllNotifications(); - $output->redirect( $this->getTitle()->getFullUrl( $nondefaults ) ); + $output->redirect( $this->getTitle()->getFullURL( $nondefaults ) ); return; } @@ -251,7 +251,7 @@ class SpecialWatchlist extends SpecialPage { } if( $wgShowUpdatedMarker ) { $form .= Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalUrl(), + 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-watchlist-resetbutton' ) ) . "\n" . $this->msg( 'wlheader-showupdated' )->parse() . Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" . @@ -341,7 +341,7 @@ class SpecialWatchlist extends SpecialPage { $form .= $wlInfo; $form .= $cutofflinks; $form .= $lang->pipeList( $links ) . "\n"; - $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl(), 'id' => 'mw-watchlist-form-namespaceselector' ) ) . "\n"; + $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-watchlist-form-namespaceselector' ) ) . "\n"; $form .= "
\n

"; $form .= Html::namespaceSelector( array( diff --git a/maintenance/dumpSisterSites.php b/maintenance/dumpSisterSites.php index e05e154ed4..1eecfe4e7e 100644 --- a/maintenance/dumpSisterSites.php +++ b/maintenance/dumpSisterSites.php @@ -50,7 +50,7 @@ class DumpSisterSites extends Maintenance { foreach ( $result as $row ) { $title = Title::makeTitle( $row->page_namespace, $row->page_title ); - $url = $title->getFullUrl(); + $url = $title->getFullURL(); $text = $title->getPrefixedText(); $this->output( "$url $text\n" ); } diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index b72c417e73..fb66db0036 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -63,7 +63,7 @@ class PurgeList extends Maintenance { } elseif ( $page !== '' ) { $title = Title::newFromText( $page ); if ( $title ) { - $url = $title->getInternalUrl(); + $url = $title->getInternalURL(); $this->output( "$url\n" ); $urls[] = $url; if ( $this->getOption( 'purge' ) ) { @@ -88,7 +88,7 @@ class PurgeList extends Maintenance { $conds = array( 'page_namespace' => $namespace ); } while ( true ) { - $res = $dbr->select( 'page', + $res = $dbr->select( 'page', array( 'page_id', 'page_namespace', 'page_title' ), $conds + array( 'page_id > ' . $dbr->addQuotes( $startId ) ), __METHOD__, @@ -104,7 +104,7 @@ class PurgeList extends Maintenance { $urls = array(); foreach ( $res as $row ) { $title = Title::makeTitle( $row->page_namespace, $row->page_title ); - $url = $title->getInternalUrl(); + $url = $title->getInternalURL(); $urls[] = $url; $startId = $row->page_id; } diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index 279932f99b..876876b31a 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -116,13 +116,13 @@ class SideBarTest extends MediaWikiLangTestCase { # ** Baz|Fred array( 'text' => 'Fred', - 'href' => Title::newFromText( 'Baz' )->getLocalUrl(), + 'href' => Title::newFromText( 'Baz' )->getLocalURL(), 'id' => 'n-Fred', 'active' => null, ), array( 'text' => 'title-to-display', - 'href' => Title::newFromText( 'page-to-go-to' )->getLocalUrl(), + 'href' => Title::newFromText( 'page-to-go-to' )->getLocalURL(), 'id' => 'n-title-to-display', 'active' => null, ), -- 2.20.1