From bc798535fd538afd26e587242cab158d87549308 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 24 Dec 2013 00:07:04 -0800 Subject: [PATCH] Deprecate SpecialPage::getTitle Callers should use SpecialPage::getPageTitle, which is exactly identical. This is so that in the future we can turn SpecialPage into a ContextSource, which requires getTitle to return getContext()->getTitle. Change-Id: Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40 --- RELEASE-NOTES-1.23 | 2 ++ includes/QueryPage.php | 4 ++-- includes/SpecialPageFactory.php | 4 ++-- includes/actions/RevisiondeleteAction.php | 2 +- includes/specialpage/SpecialPage.php | 15 ++++++++++++++- includes/specials/SpecialAllpages.php | 8 ++++---- includes/specials/SpecialBlockList.php | 2 +- includes/specials/SpecialBooksources.php | 2 +- includes/specials/SpecialChangeEmail.php | 2 +- includes/specials/SpecialChangePassword.php | 2 +- includes/specials/SpecialConfirmemail.php | 2 +- includes/specials/SpecialContributions.php | 2 +- .../specials/SpecialDeletedContributions.php | 2 +- includes/specials/SpecialEditWatchlist.php | 4 ++-- includes/specials/SpecialEmailuser.php | 4 ++-- includes/specials/SpecialExpandTemplates.php | 4 ++-- includes/specials/SpecialExport.php | 2 +- .../specials/SpecialFileDuplicateSearch.php | 2 +- includes/specials/SpecialImport.php | 6 +++--- includes/specials/SpecialJavaScriptTest.php | 4 ++-- includes/specials/SpecialLinkSearch.php | 2 +- includes/specials/SpecialMIMEsearch.php | 2 +- includes/specials/SpecialMergeHistory.php | 4 ++-- includes/specials/SpecialMovepage.php | 2 +- includes/specials/SpecialNewpages.php | 6 +++--- includes/specials/SpecialPreferences.php | 4 ++-- includes/specials/SpecialPrefixindex.php | 4 ++-- includes/specials/SpecialProtectedpages.php | 2 +- includes/specials/SpecialProtectedtitles.php | 2 +- includes/specials/SpecialRandomInCategory.php | 2 +- includes/specials/SpecialRecentchanges.php | 6 +++--- .../specials/SpecialRecentchangeslinked.php | 2 +- includes/specials/SpecialRevisiondelete.php | 4 ++-- includes/specials/SpecialSearch.php | 6 +++--- includes/specials/SpecialSpecialpages.php | 2 +- includes/specials/SpecialUndelete.php | 18 +++++++++--------- includes/specials/SpecialUpload.php | 2 +- includes/specials/SpecialUploadStash.php | 6 +++--- includes/specials/SpecialUserlogin.php | 8 ++++---- includes/specials/SpecialUserrights.php | 6 +++--- includes/specials/SpecialWatchlist.php | 12 ++++++------ includes/specials/SpecialWhatlinkshere.php | 6 +++--- includes/specials/SpecialWithoutinterwiki.php | 2 +- 43 files changed, 100 insertions(+), 85 deletions(-) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index db80ad3c09..a54e57e7a3 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -126,6 +126,8 @@ changes to languages because of Bugzilla reports. and their definition was changed not to include the common*.css files; the two skins now load the 'skins.common.interface' module instead. * A page_links_updated field has been added to the page table. +* SpecialPage::getTitle has been deprecated in favor of + SpecialPage::getPageTitle. == Compatibility == diff --git a/includes/QueryPage.php b/includes/QueryPage.php index a904c248ce..6d8a6bfccf 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -547,7 +547,7 @@ abstract class QueryPage extends SpecialPage { min( $this->numRows, $this->limit ), # do not show the one extra row, if exist $this->offset + 1 )->parseAsBlock() ); # Disable the "next" link when we reach the end - $paging = $this->getLanguage()->viewPrevNext( $this->getTitle( $par ), $this->offset, + $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset, $this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) ); $out->addHTML( '

' . $paging . '

' ); } else { @@ -749,7 +749,7 @@ abstract class QueryPage extends SpecialPage { } function feedUrl() { - return $this->getTitle()->getFullURL(); + return $this->getPageTitle()->getFullURL(); } } diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index aa5ac87cb1..2cd9a3aabd 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -466,13 +466,13 @@ class SpecialPageFactory { if ( $name != $page->getLocalName() && !$context->getRequest()->wasPosted() ) { $query = $context->getRequest()->getQueryValues(); unset( $query['title'] ); - $title = $page->getTitle( $par ); + $title = $page->getPageTitle( $par ); $url = $title->getFullURL( $query ); $context->getOutput()->redirect( $url ); wfProfileOut( __METHOD__ ); return $title; } else { - $context->setTitle( $page->getTitle( $par ) ); + $context->setTitle( $page->getPageTitle( $par ) ); } } elseif ( !$page->isIncludable() ) { diff --git a/includes/actions/RevisiondeleteAction.php b/includes/actions/RevisiondeleteAction.php index 1803629e83..b6eeb7b4f6 100644 --- a/includes/actions/RevisiondeleteAction.php +++ b/includes/actions/RevisiondeleteAction.php @@ -49,7 +49,7 @@ class RevisiondeleteAction extends FormlessAction { public function show() { $special = SpecialPageFactory::getPage( 'Revisiondelete' ); $special->setContext( $this->getContext() ); - $special->getContext()->setTitle( $special->getTitle() ); + $special->getContext()->setTitle( $special->getPageTitle() ); $special->run( '' ); } } diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index 392d04b02d..41b64352ab 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -27,6 +27,7 @@ * Includes some static functions for handling the special page list deprecated * in favor of SpecialPageFactory. * + * @todo Turn this into a real ContextSource * @ingroup SpecialPage */ class SpecialPage { @@ -629,7 +630,7 @@ class SpecialPage { SpecialPage::getTitleFor( 'Userlogin' ), $this->msg( 'loginreqlink' )->escaped(), array(), - array( 'returnto' => $this->getTitle()->getPrefixedText() ) + array( 'returnto' => $this->getPageTitle()->getPrefixedText() ) ); $reasonMsg = $this->msg( $reasonMsg )->rawParams( $loginreqlink ); } @@ -768,8 +769,20 @@ class SpecialPage { * * @param $subpage String|Bool * @return Title object + * @deprecated in 1.23, use SpecialPage::getPageTitle */ function getTitle( $subpage = false ) { + wfDeprecated( __METHOD__, '1.23' ); + return $this->getPageTitle( $subpage ); + } + + /** + * Get a self-referential title object + * + * @param $subpage String|Bool + * @return Title object + */ + function getPageTitle( $subpage = false ) { return self::getTitleFor( $this->mName, $subpage ); } diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index 388705d0c2..1e2d557b00 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -123,7 +123,7 @@ class SpecialAllpages extends IncludableSpecialPage { */ function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) { global $wgScript; - $t = $this->getTitle(); + $t = $this->getPageTitle(); $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); @@ -302,7 +302,7 @@ class SpecialAllpages extends IncludableSpecialPage { $nsForm . ' ' . - Linker::link( $this->getTitle(), $this->msg( 'allpages' )->escaped(), + Linker::link( $this->getPageTitle(), $this->msg( 'allpages' )->escaped(), array(), array(), 'known' ) . " " . @@ -346,7 +346,7 @@ class SpecialAllpages extends IncludableSpecialPage { $queryParams['hideredirects'] = 1; } - $url = $this->getTitle()->getLocalURL( $queryParams ); + $url = $this->getPageTitle()->getLocalURL( $queryParams ); $inlink = Html::element( 'a', array( 'href' => $url ), $inpointf ); $outlink = Html::element( 'a', array( 'href' => $url ), $outpointf ); @@ -480,7 +480,7 @@ class SpecialAllpages extends IncludableSpecialPage { } } - $self = $this->getTitle(); + $self = $this->getPageTitle(); $nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects ); $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) . diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4e4db115b3..4e7043d77b 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -97,7 +97,7 @@ class SpecialBlockList extends SpecialPage { ), ); $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle() ); // Remove subpage + $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = new HTMLForm( $fields, $context ); $form->setMethod( 'get' ); $form->setWrapperLegendMsg( 'ipblocklist-legend' ); diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 5ad961c3db..7b6cca0098 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -120,7 +120,7 @@ class SpecialBookSources extends SpecialPage { $form = Html::openElement( 'fieldset' ) . "\n"; $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n"; $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n"; - $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; + $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n"; $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) ); $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "

\n"; $form .= Html::closeElement( 'form' ) . "\n"; diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index e1531ccab0..d9ef5d7aa2 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -148,7 +148,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL(), + 'action' => $this->getPageTitle()->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 43a4d2cd7a..4b6299084b 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -166,7 +166,7 @@ class SpecialChangePassword extends UnlistedSpecialPage { Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL(), + 'action' => $this->getPageTitle()->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 bef155ca8f..d771589d82 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -101,7 +101,7 @@ class EmailConfirmation extends UnlistedSpecialPage { $out->addWikiMsg( 'confirmemail_text' ); $form = Html::openElement( 'form', - array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL() ) + array( 'method' => 'post', 'action' => $this->getPageTitle()->getLocalURL() ) ) . "\n"; $form .= Html::hidden( 'token', $user->getEditToken() ) . "\n"; $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() ) . "\n"; diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 551b9727e8..262e238860 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -354,7 +354,7 @@ class SpecialContributions extends SpecialPage { protected function getForm() { global $wgScript; - $this->opts['title'] = $this->getTitle()->getPrefixedText(); + $this->opts['title'] = $this->getPageTitle()->getPrefixedText(); if ( !isset( $this->opts['target'] ) ) { $this->opts['target'] = ''; } else { diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 9b9888adf3..d148a50e00 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -495,7 +495,7 @@ class DeletedContributionsPage extends SpecialPage { function getForm( $options ) { global $wgScript; - $options['title'] = $this->getTitle()->getPrefixedText(); + $options['title'] = $this->getPageTitle()->getPrefixedText(); if ( !isset( $options['target'] ) ) { $options['target'] = ''; } else { diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index daa56b39b4..98d5feadea 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -534,7 +534,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { } $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle() ); // Remove subpage + $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = new EditWatchlistNormalHTMLForm( $fields, $context ); $form->setSubmitTextMsg( 'watchlistedit-normal-submit' ); # Used message keys: 'accesskey-watchlistedit-normal-submit', 'tooltip-watchlistedit-normal-submit' @@ -598,7 +598,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { ), ); $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle( 'raw' ) ); // Reset subpage + $context->setTitle( $this->getPageTitle( 'raw' ) ); // Reset subpage $form = new HTMLForm( $fields, $context ); $form->setSubmitTextMsg( 'watchlistedit-raw-submit' ); # Used message keys: 'accesskey-watchlistedit-raw-submit', 'tooltip-watchlistedit-raw-submit' diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 2e90d99609..908e59c36f 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -149,7 +149,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { $this->mTargetObj = $ret; $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle() ); // Remove subpage + $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = new HTMLForm( $this->getFormFields(), $context ); // By now we are supposed to be sure that $this->mTarget is a user name $form->addPreText( $this->msg( 'emailpagetext', $this->mTarget )->parse() ); @@ -260,7 +260,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . Xml::openElement( 'fieldset' ) . Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) . Xml::inputLabel( diff --git a/includes/specials/SpecialExpandTemplates.php b/includes/specials/SpecialExpandTemplates.php index 19d7a6bf75..7241105561 100644 --- a/includes/specials/SpecialExpandTemplates.php +++ b/includes/specials/SpecialExpandTemplates.php @@ -61,7 +61,7 @@ class SpecialExpandTemplates extends SpecialPage { $title = Title::newFromText( $titleStr ); if ( !$title ) { - $title = $this->getTitle(); + $title = $this->getPageTitle(); } $input = $request->getText( 'wpInput' ); $this->generateXML = $request->getBool( 'wpGenerateXml' ); @@ -138,7 +138,7 @@ class SpecialExpandTemplates extends SpecialPage { * @return string */ private function makeForm( $title, $input ) { - $self = $this->getTitle(); + $self = $this->getPageTitle(); $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 61ed34d473..bbed9e6086 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -185,7 +185,7 @@ class SpecialExport extends SpecialPage { $out->addWikiMsg( 'exporttext' ); $form = Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL( 'action=submit' ) ) ); + 'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ) ) ); $form .= Xml::inputLabel( $this->msg( 'export-addcattext' )->text(), 'catname', diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 4c6593b272..9cf5a73c30 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -117,7 +117,7 @@ class FileDuplicateSearchPage extends QueryPage { 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) . "\n" . - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . "\n" . Html::openElement( 'fieldset' ) . "\n" . Html::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) . "\n" . Xml::inputLabel( diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 1bc6c92d61..2ac34eb40d 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -64,11 +64,11 @@ class SpecialImport extends SpecialPage { # @todo FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected' $errors = wfMergeErrorArrays( - $this->getTitle()->getUserPermissionsErrors( + $this->getPageTitle()->getUserPermissionsErrors( 'import', $user, true, array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) ), - $this->getTitle()->getUserPermissionsErrors( + $this->getPageTitle()->getUserPermissionsErrors( 'importupload', $user, true, array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) ) @@ -203,7 +203,7 @@ class SpecialImport extends SpecialPage { private function showForm() { global $wgImportSources, $wgExportMaxLinkDepth; - $action = $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ); + $action = $this->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ); $user = $this->getUser(); $out = $this->getOutput(); diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 7069d5270e..57d314f443 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -68,7 +68,7 @@ class SpecialJavaScriptTest extends SpecialPage { $this->msg( "javascripttest-$framework-name" )->plain() ) ); $out->setSubtitle( $this->msg( 'javascripttest-backlink' ) - ->rawParams( Linker::linkKnown( $this->getTitle() ) ) ); + ->rawParams( Linker::linkKnown( $this->getPageTitle() ) ) ); $this->{self::$frameworks[$framework]}(); } else { // Framework not found, display error @@ -97,7 +97,7 @@ class SpecialJavaScriptTest extends SpecialPage { 'li', array(), Linker::link( - $this->getTitle( $framework ), + $this->getPageTitle( $framework ), // Message: javascripttest-qunit-name $this->msg( "javascripttest-$framework-name" )->escaped() ) diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index 5c121bab99..0b5b825713 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -86,7 +86,7 @@ class LinkSearchPage extends QueryPage { 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $wgScript ) ) . "\n" . - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . "\n" . Html::openElement( 'fieldset' ) . "\n" . Html::element( 'legend', array(), $this->msg( 'linksearch' )->text() ) . "\n" . Xml::inputLabel( diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index 3eeae310e0..dd78c4c6b2 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -112,7 +112,7 @@ class MIMEsearchPage extends QueryPage { array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgScript ) ) . Xml::openElement( 'fieldset' ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . Xml::element( 'legend', null, $this->msg( 'mimesearch' )->text() ) . Xml::inputLabel( $this->msg( 'mimetype' )->text(), 'mime', 'mime', 20, $mime ) . ' ' . diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index fb5ea65796..f799fc5aeb 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -142,7 +142,7 @@ class SpecialMergeHistory extends SpecialPage { '
' . Xml::element( 'legend', array(), $this->msg( 'mergehistory-box' )->text() ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . Html::hidden( 'submitted', '1' ) . Html::hidden( 'mergepoint', $this->mTimestamp ) . Xml::openElement( 'table' ) . @@ -171,7 +171,7 @@ class SpecialMergeHistory extends SpecialPage { $haveRevisions = $revisions && $revisions->getNumRows() > 0; $out = $this->getOutput(); - $titleObj = $this->getTitle(); + $titleObj = $this->getPageTitle(); $action = $titleObj->getLocalURL( array( 'action' => 'submit' ) ); # Start the form here $top = Xml::openElement( diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 253e6cc37d..e56723c584 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -281,7 +281,7 @@ class MovePageForm extends UnlistedSpecialPage { 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), + 'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) . diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 006510df7f..1e631f9939 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -194,7 +194,7 @@ class SpecialNewpages extends IncludableSpecialPage { $changed = $this->opts->getChangedValues(); unset( $changed['offset'] ); // Reset offset if query type changes - $self = $this->getTitle(); + $self = $this->getPageTitle(); foreach ( $filters as $key => $msg ) { $onoff = 1 - $this->opts->getValue( $key ); $link = Linker::link( $self, $showhide[$onoff], array(), @@ -233,7 +233,7 @@ class SpecialNewpages extends IncludableSpecialPage { } $form = Xml::openElement( 'form', array( 'action' => $wgScript ) ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . Xml::fieldset( $this->msg( 'newpages' )->text() ) . Xml::openElement( 'table', array( 'id' => 'mw-newpages-table' ) ) . ' @@ -430,7 +430,7 @@ class SpecialNewpages extends IncludableSpecialPage { $feed = new $wgFeedClasses[$type]( $this->feedTitle(), $this->msg( 'tagline' )->text(), - $this->getTitle()->getFullURL() + $this->getPageTitle()->getFullURL() ); $pager = new NewPagesPager( $this, $this->opts ); diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 51454f69ae..4cfd445f9f 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -69,7 +69,7 @@ class SpecialPreferences extends SpecialPage { $this->getOutput()->addWikiMsg( 'prefs-reset-intro' ); $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle( 'reset' ) ); // Reset subpage + $context->setTitle( $this->getPageTitle( 'reset' ) ); // Reset subpage $htmlForm = new HTMLForm( array(), $context, 'prefs-restore' ); $htmlForm->setSubmitTextMsg( 'restoreprefs' ); @@ -88,7 +88,7 @@ class SpecialPreferences extends SpecialPage { $user->resetOptions( 'all', $this->getContext() ); $user->saveSettings(); - $url = $this->getTitle()->getFullURL( 'success' ); + $url = $this->getPageTitle()->getFullURL( 'success' ); $this->getOutput()->redirect( $url ); diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 28d07ffc51..c6307f03ba 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -101,7 +101,7 @@ class SpecialPrefixindex extends SpecialAllpages { $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); - $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); + $out .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ); $out .= Xml::openElement( 'fieldset' ); $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() ); $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) ); @@ -249,7 +249,7 @@ class SpecialPrefixindex extends SpecialAllpages { $out2 = ''; } else { $nsForm = $this->namespacePrefixForm( $namespace, $prefix ); - $self = $this->getTitle(); + $self = $this->getPageTitle(); $out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) . ' ' . diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 3de6ea244d..db3be12eec 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -200,7 +200,7 @@ class SpecialProtectedpages extends SpecialPage { ) { global $wgScript; - $title = $this->getTitle(); + $title = $this->getPageTitle(); return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . Xml::openElement( 'fieldset' ) . diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 078e7b129f..c3ebd807dc 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -135,7 +135,7 @@ class SpecialProtectedtitles extends SpecialPage { function showOptions( $namespace, $type = 'edit', $level ) { global $wgScript; $action = htmlspecialchars( $wgScript ); - $title = $this->getTitle(); + $title = $this->getPageTitle(); $special = htmlspecialchars( $title->getPrefixedDBkey() ); return "
\n" . diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index 14123a8be3..4e2f0e72d5 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -101,7 +101,7 @@ class SpecialRandomInCategory extends SpecialPage { $msg = $this->msg( 'randomincategory-selectcategory' ); $form = Html::rawElement( 'form', array( 'action' => $wgScript ), - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . $msg->rawParams( $input, $submit )->parse() ); $this->getOutput()->addHtml( $form ); diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index f86615892b..2288bf29c9 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -189,7 +189,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { $formatter = $changesFeed->getFeedObject( $this->msg( 'recentchanges' )->inContentLanguage()->text(), $this->msg( 'recentchanges-feed-description' )->inContentLanguage()->text(), - $this->getTitle()->getFullURL() + $this->getPageTitle()->getFullURL() ); return array( $changesFeed, $formatter ); @@ -593,7 +593,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { $out .= Html::hidden( $key, $value ); } - $t = $this->getTitle(); + $t = $this->getPageTitle(); $out .= Html::hidden( 'title', $t->getPrefixedText() ); $form = Xml::tags( 'form', array( 'action' => $wgScript ), $out ); $panel[] = $form; @@ -862,7 +862,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { $text = '' . $text . ''; } - return Linker::linkKnown( $this->getTitle(), $text, array(), $params ); + return Linker::linkKnown( $this->getPageTitle(), $text, array(), $params ); } /** diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 1c3e05cde3..5dee226672 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -50,7 +50,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { $this->msg( 'recentchangeslinked-title', $this->getTargetTitle()->getPrefixedText() ) ->inContentLanguage()->text(), $this->msg( 'recentchangeslinked-feed' )->inContentLanguage()->text(), - $this->getTitle()->getFullURL() + $this->getPageTitle()->getFullURL() ); return array( $feed, $feedObj ); } diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 87705a8ecd..96e063e96f 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -272,7 +272,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $this->getOutput()->addHTML( Xml::openElement( 'form', array( 'method' => 'POST', - 'action' => $this->getTitle()->getLocalURL( array( + 'action' => $this->getPageTitle()->getLocalURL( array( 'target' => $this->targetObj->getPrefixedDBkey(), 'file' => $archiveName, 'token' => $user->getEditToken( $archiveName ), @@ -357,7 +357,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->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ), 'id' => 'mw-revdel-form-revisions' ) ) . Xml::fieldset( $this->msg( 'revdelete-legend' )->text() ) . $this->buildCheckBoxes() . diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 36ccaf8b75..62eeb403c3 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -375,7 +375,7 @@ class SpecialSearch extends SpecialPage { if ( $num || $this->offset ) { // Show the create link ahead $this->showCreateLink( $t, $num ); - $prevnext = $this->getLanguage()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit, + $prevnext = $this->getLanguage()->viewPrevNext( $this->getPageTitle(), $this->offset, $this->limit, $this->powerSearchOptions() + array( 'search' => $term ), max( $titleMatchesNum, $textMatchesNum ) < $this->limit ); @@ -1089,7 +1089,7 @@ class SpecialSearch extends SpecialPage { * @return string */ protected function shortDialog( $term ) { - $out = Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); + $out = Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ); $out .= Html::hidden( 'profile', $this->profile ) . "\n"; // Term box $out .= Html::input( 'search', $term, 'search', array( @@ -1134,7 +1134,7 @@ class SpecialSearch extends SpecialPage { return Xml::element( 'a', array( - 'href' => $this->getTitle()->getLocalURL( $stParams ), + 'href' => $this->getPageTitle()->getLocalURL( $stParams ), 'title' => $tooltip ), $label diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index 0042b43b3a..3ed3ac3ed1 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -68,7 +68,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage { $groups[$group] = array(); } $groups[$group][$page->getDescription()] = array( - $page->getTitle(), + $page->getPageTitle(), $page->isRestricted(), $page->isCached() ); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 264eb46d1b..0dd5a0c4e0 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -809,7 +809,7 @@ class SpecialUndelete extends SpecialPage { $out->addHTML( Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . Xml::fieldset( $this->msg( 'undelete-search-box' )->text() ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . Html::rawElement( 'label', array( 'for' => 'prefix' ), @@ -849,7 +849,7 @@ class SpecialUndelete extends SpecialPage { $out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) ); - $undelete = $this->getTitle(); + $undelete = $this->getPageTitle(); $out->addHTML( "
    \n" ); foreach ( $result as $row ) { $title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title ); @@ -932,7 +932,7 @@ class SpecialUndelete extends SpecialPage { } $link = Linker::linkKnown( - $this->getTitle( $this->mTargetObj->getPrefixedDBkey() ), + $this->getPageTitle( $this->mTargetObj->getPrefixedDBkey() ), htmlspecialchars( $this->mTargetObj->getPrefixedText() ) ); @@ -1015,7 +1015,7 @@ class SpecialUndelete extends SpecialPage { 'style' => 'clear: both' ) ) . Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ) ) ) . + 'action' => $this->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ) ) ) . Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'target', @@ -1074,7 +1074,7 @@ class SpecialUndelete extends SpecialPage { $isDeleted = !( $rev->getId() && $rev->getTitle() ); if ( $isDeleted ) { /// @todo FIXME: $rev->getTitle() is null for deleted revs...? - $targetPage = $this->getTitle(); + $targetPage = $this->getPageTitle(); $targetQuery = array( 'target' => $this->mTargetObj->getPrefixedText(), 'timestamp' => wfTimestamp( TS_MW, $rev->getTimestamp() ) @@ -1145,7 +1145,7 @@ class SpecialUndelete extends SpecialPage { $out->addHTML( Xml::openElement( 'form', array( 'method' => 'POST', - 'action' => $this->getTitle()->getLocalURL( array( + 'action' => $this->getPageTitle()->getLocalURL( array( 'target' => $this->mTarget, 'file' => $key, 'token' => $user->getEditToken( $key ), @@ -1233,7 +1233,7 @@ class SpecialUndelete extends SpecialPage { } if ( $this->mAllowed ) { - $action = $this->getTitle()->getLocalURL( array( 'action' => 'submit' ) ); + $action = $this->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ); # Start the form here $top = Xml::openElement( 'form', @@ -1364,7 +1364,7 @@ class SpecialUndelete extends SpecialPage { // Build page & diff links... $user = $this->getUser(); if ( $this->mCanView ) { - $titleObj = $this->getTitle(); + $titleObj = $this->getPageTitle(); # Last link if ( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) { $pageLink = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) ); @@ -1430,7 +1430,7 @@ class SpecialUndelete extends SpecialPage { if ( $this->mAllowed && $row->fa_storage_key ) { $checkBox = Xml::check( 'fileid' . $row->fa_id ); $key = urlencode( $row->fa_storage_key ); - $pageLink = $this->getFileLink( $file, $this->getTitle(), $ts, $key ); + $pageLink = $this->getFileLink( $file, $this->getPageTitle(), $ts, $key ); } else { $checkBox = ''; $pageLink = $this->getLanguage()->userTimeAndDate( $ts, $user ); diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 7c05001fb0..5175ec9769 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -220,7 +220,7 @@ class SpecialUpload extends SpecialPage { protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) { # Initialize form $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle() ); // Remove subpage + $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = new UploadForm( array( 'watch' => $this->getWatchCheck(), 'forreupload' => $this->mForReUpload, diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 1373df1aca..37bfa39bf8 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -346,7 +346,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { // this design is extremely dubious, but supposedly HTMLForm is our standard now? $context = new DerivativeContext( $this->getContext() ); - $context->setTitle( $this->getTitle() ); // Remove subpage + $context->setTitle( $this->getPageTitle() ); // Remove subpage $form = new HTMLForm( array( 'Clear' => array( 'type' => 'hidden', @@ -362,7 +362,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { // show the files + form, if there are any, or just say there are none $refreshHtml = Html::element( 'a', - array( 'href' => $this->getTitle()->getLocalURL() ), + array( 'href' => $this->getPageTitle()->getLocalURL() ), $this->msg( 'uploadstash-refresh' )->text() ); $files = $this->stash->listFiles(); if ( $files && count( $files ) ) { @@ -372,7 +372,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { // TODO: Use Linker::link or even construct the list in plain wikitext $fileListItemsHtml .= Html::rawElement( 'li', array(), Html::element( 'a', array( 'href' => - $this->getTitle( "file/$file" )->getLocalURL() ), $file ) + $this->getPageTitle( "file/$file" )->getLocalURL() ), $file ) ); } $this->getOutput()->addHtml( Html::rawElement( 'ul', array(), $fileListItemsHtml ) ); diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index d071e75cc8..3a6401491a 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -318,7 +318,7 @@ class LoginForm extends SpecialPage { # Confirm that the account was created $out->setPageTitle( $this->msg( 'accountcreated' ) ); $out->addWikiMsg( 'accountcreatedtext', $u->getName() ); - $out->addReturnTo( $this->getTitle() ); + $out->addReturnTo( $this->getPageTitle() ); wfRunHooks( 'AddNewAccount', array( $u, false ) ); $u->addNewUserLogEntry( 'create2', $this->mReason ); } @@ -390,7 +390,7 @@ class LoginForm extends SpecialPage { } # Include checks that will include GlobalBlocking (Bug 38333) - $permErrors = $this->getTitle()->getUserPermissionsErrors( 'createaccount', $currentUser, true ); + $permErrors = $this->getPageTitle()->getUserPermissionsErrors( 'createaccount', $currentUser, true ); if ( count( $permErrors ) ) { throw new PermissionsError( 'createaccount', $permErrors ); } @@ -1075,7 +1075,7 @@ class LoginForm extends SpecialPage { global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration; global $wgSecureLogin, $wgPasswordResetRoutes; - $titleObj = $this->getTitle(); + $titleObj = $this->getPageTitle(); $user = $this->getUser(); $out = $this->getOutput(); @@ -1431,7 +1431,7 @@ class LoginForm extends SpecialPage { $attr['lang'] = $attr['hreflang'] = $targetLanguage->getHtmlCode(); return Linker::linkKnown( - $this->getTitle(), + $this->getPageTitle(), htmlspecialchars( $text ), $attr, $query diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 4501736f43..014408e568 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -174,7 +174,7 @@ class UserrightsPage extends SpecialPage { } function getSuccessURL() { - return $this->getTitle( $this->mTarget )->getFullURL( array( 'success' => 1 ) ); + return $this->getPageTitle( $this->mTarget )->getFullURL( array( 'success' => 1 ) ); } /** @@ -405,7 +405,7 @@ class UserrightsPage extends SpecialPage { global $wgScript; $this->getOutput()->addHTML( Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . Xml::fieldset( $this->msg( 'userrights-lookup-user' )->text() ) . Xml::inputLabel( $this->msg( 'userrights-user-editname' )->text(), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ), array( 'autofocus' => true ) ) . ' ' . Xml::submitButton( $this->msg( 'editusergroup' )->text() ) . @@ -490,7 +490,7 @@ class UserrightsPage extends SpecialPage { ); $this->getOutput()->addHTML( - Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . + Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getPageTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . Html::hidden( 'user', $this->mTarget ) . Html::hidden( 'wpEditToken', $this->getUser()->getEditToken( $this->mTarget ) ) . Html::hidden( 'conflictcheck-originalgroups', implode( ',', $user->getGroups() ) ) . // Conflict detection diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 4d86744781..1f4d46f141 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -159,7 +159,7 @@ class SpecialWatchlist extends SpecialPage { && $request->wasPosted() ) { $user->clearAllNotifications(); - $output->redirect( $this->getTitle()->getFullURL( $nondefaults ) ); + $output->redirect( $this->getPageTitle()->getFullURL( $nondefaults ) ); return; } @@ -236,7 +236,7 @@ class SpecialWatchlist extends SpecialPage { if ( $wgShowUpdatedMarker ) { $form .= Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL(), + 'action' => $this->getPageTitle()->getLocalURL(), 'id' => 'mw-watchlist-resetbutton' ) ) . "\n" . Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" . Html::hidden( 'reset', 'all' ) . "\n"; @@ -248,7 +248,7 @@ class SpecialWatchlist extends SpecialPage { $form .= Xml::openElement( 'form', array( 'method' => 'post', - 'action' => $this->getTitle()->getLocalURL(), + 'action' => $this->getPageTitle()->getLocalURL(), 'id' => 'mw-watchlist-form' ) ); $form .= Xml::fieldset( @@ -437,14 +437,14 @@ class SpecialWatchlist extends SpecialPage { $label = $this->msg( $value ? 'show' : 'hide' )->escaped(); $options[$name] = 1 - (int)$value; - return $this->msg( $message )->rawParams( Linker::linkKnown( $this->getTitle(), $label, array(), $options ) )->escaped(); + return $this->msg( $message )->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )->escaped(); } protected function hoursLink( $h, $options = array() ) { $options['days'] = ( $h / 24.0 ); return Linker::linkKnown( - $this->getTitle(), + $this->getPageTitle(), $this->getLanguage()->formatNum( $h ), array(), $options @@ -456,7 +456,7 @@ class SpecialWatchlist extends SpecialPage { $message = ( $d ? $this->getLanguage()->formatNum( $d ) : $this->msg( 'watchlistall2' )->escaped() ); return Linker::linkKnown( - $this->getTitle(), + $this->getPageTitle(), $message, array(), $options diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 05c7dd5f0d..3f9b98d5e4 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -84,7 +84,7 @@ class SpecialWhatLinksHere extends SpecialPage { $this->getSkin()->setRelevantTitle( $this->target ); - $this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() ); + $this->selfTitle = $this->getPageTitle( $this->target->getPrefixedDBkey() ); $out->setPageTitle( $this->msg( 'whatlinkshere-title', $this->target->getPrefixedText() ) ); $out->addBacklinkSubtitle( $this->target ); @@ -342,7 +342,7 @@ class SpecialWhatLinksHere extends SpecialPage { protected function wlhLink( Title $target, $text ) { static $title = null; if ( $title === null ) { - $title = $this->getTitle(); + $title = $this->getPageTitle(); } return Linker::linkKnown( @@ -407,7 +407,7 @@ class SpecialWhatLinksHere extends SpecialPage { $f = Xml::openElement( 'form', array( 'action' => $wgScript ) ); # Values that should not be forgotten - $f .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); + $f .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ); foreach ( $this->opts->getUnconsumedValues() as $name => $value ) { $f .= Html::hidden( $name, $value ); } diff --git a/includes/specials/SpecialWithoutinterwiki.php b/includes/specials/SpecialWithoutinterwiki.php index 9d23499f93..2ddde4351b 100644 --- a/includes/specials/SpecialWithoutinterwiki.php +++ b/includes/specials/SpecialWithoutinterwiki.php @@ -49,7 +49,7 @@ class WithoutInterwikiPage extends PageQueryPage { } $prefix = $this->prefix; - $t = $this->getTitle(); + $t = $this->getPageTitle(); return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n" . Html::openElement( 'fieldset' ) . "\n" . -- 2.20.1