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 ==
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( '<p>' . $paging . '</p>' );
} else {
}
function feedUrl() {
- return $this->getTitle()->getFullURL();
+ return $this->getPageTitle()->getFullURL();
}
}
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() ) {
public function show() {
$special = SpecialPageFactory::getPage( 'Revisiondelete' );
$special->setContext( $this->getContext() );
- $special->getContext()->setTitle( $special->getTitle() );
+ $special->getContext()->setTitle( $special->getPageTitle() );
$special->run( '' );
}
}
* 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 {
SpecialPage::getTitleFor( 'Userlogin' ),
$this->msg( 'loginreqlink' )->escaped(),
array(),
- array( 'returnto' => $this->getTitle()->getPrefixedText() )
+ array( 'returnto' => $this->getPageTitle()->getPrefixedText() )
);
$reasonMsg = $this->msg( $reasonMsg )->rawParams( $loginreqlink );
}
*
* @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 );
}
*/
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 ) );
$nsForm .
'</td>
<td class="mw-allpages-nav">' .
- Linker::link( $this->getTitle(), $this->msg( 'allpages' )->escaped(),
+ Linker::link( $this->getPageTitle(), $this->msg( 'allpages' )->escaped(),
array(), array(), 'known' ) .
"</td>
</tr>" .
$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 );
}
}
- $self = $this->getTitle();
+ $self = $this->getPageTitle();
$nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
$out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) .
),
);
$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' );
$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 .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
$form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
$form .= Html::closeElement( 'form' ) . "\n";
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" .
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" .
$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";
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 {
function getForm( $options ) {
global $wgScript;
- $options['title'] = $this->getTitle()->getPrefixedText();
+ $options['title'] = $this->getPageTitle()->getPrefixedText();
if ( !isset( $options['target'] ) ) {
$options['target'] = '';
} else {
}
$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'
),
);
$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'
$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() );
'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(
$title = Title::newFromText( $titleStr );
if ( !$title ) {
- $title = $this->getTitle();
+ $title = $this->getPageTitle();
}
$input = $request->getText( 'wpInput' );
$this->generateXML = $request->getBool( 'wpGenerateXml' );
* @return string
*/
private function makeForm( $title, $input ) {
- $self = $this->getTitle();
+ $self = $this->getPageTitle();
$form = Xml::openElement(
'form',
array( 'method' => 'post', 'action' => $self->getLocalUrl() )
$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',
'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(
# @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' )
)
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();
$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
'li',
array(),
Linker::link(
- $this->getTitle( $framework ),
+ $this->getPageTitle( $framework ),
// Message: javascripttest-qunit-name
$this->msg( "javascripttest-$framework-name" )->escaped()
)
'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(
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 ) .
' ' .
'<fieldset>' .
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' ) .
$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(
'form',
array(
'method' => 'post',
- 'action' => $this->getTitle()->getLocalURL( 'action=submit' ),
+ 'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ),
'id' => 'movepage'
)
) .
$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(),
}
$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' ) ) .
'<tr>
$feed = new $wgFeedClasses[$type](
$this->feedTitle(),
$this->msg( 'tagline' )->text(),
- $this->getTitle()->getFullURL()
+ $this->getPageTitle()->getFullURL()
);
$pager = new NewPagesPager( $this, $this->opts );
$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' );
$user->resetOptions( 'all', $this->getContext() );
$user->saveSettings();
- $url = $this->getTitle()->getFullURL( 'success' );
+ $url = $this->getPageTitle()->getFullURL( 'success' );
$this->getOutput()->redirect( $url );
$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' ) );
$out2 = '';
} else {
$nsForm = $this->namespacePrefixForm( $namespace, $prefix );
- $self = $this->getTitle();
+ $self = $this->getPageTitle();
$out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) .
'<tr>
<td>' .
) {
global $wgScript;
- $title = $this->getTitle();
+ $title = $this->getPageTitle();
return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
Xml::openElement( 'fieldset' ) .
function showOptions( $namespace, $type = 'edit', $level ) {
global $wgScript;
$action = htmlspecialchars( $wgScript );
- $title = $this->getTitle();
+ $title = $this->getPageTitle();
$special = htmlspecialchars( $title->getPrefixedDBkey() );
return "<form action=\"$action\" method=\"get\">\n" .
$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 );
$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 );
$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;
$text = '<strong>' . $text . '</strong>';
}
- return Linker::linkKnown( $this->getTitle(), $text, array(), $params );
+ return Linker::linkKnown( $this->getPageTitle(), $text, array(), $params );
}
/**
$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 );
}
$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 ),
// 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() .
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
);
* @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(
return Xml::element(
'a',
array(
- 'href' => $this->getTitle()->getLocalURL( $stParams ),
+ 'href' => $this->getPageTitle()->getLocalURL( $stParams ),
'title' => $tooltip
),
$label
$groups[$group] = array();
}
$groups[$group][$page->getDescription()] = array(
- $page->getTitle(),
+ $page->getPageTitle(),
$page->isRestricted(),
$page->isCached()
);
$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' ),
$out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) );
- $undelete = $this->getTitle();
+ $undelete = $this->getPageTitle();
$out->addHTML( "<ul>\n" );
foreach ( $result as $row ) {
$title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title );
}
$link = Linker::linkKnown(
- $this->getTitle( $this->mTargetObj->getPrefixedDBkey() ),
+ $this->getPageTitle( $this->mTargetObj->getPrefixedDBkey() ),
htmlspecialchars( $this->mTargetObj->getPrefixedText() )
);
'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',
$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() )
$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 ),
}
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',
// 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 ) );
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 );
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,
// 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',
// 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 ) ) {
// 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 ) );
# 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 );
}
}
# 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 );
}
global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
global $wgSecureLogin, $wgPasswordResetRoutes;
- $titleObj = $this->getTitle();
+ $titleObj = $this->getPageTitle();
$user = $this->getUser();
$out = $this->getOutput();
$attr['lang'] = $attr['hreflang'] = $targetLanguage->getHtmlCode();
return Linker::linkKnown(
- $this->getTitle(),
+ $this->getPageTitle(),
htmlspecialchars( $text ),
$attr,
$query
}
function getSuccessURL() {
- return $this->getTitle( $this->mTarget )->getFullURL( array( 'success' => 1 ) );
+ return $this->getPageTitle( $this->mTarget )->getFullURL( array( 'success' => 1 ) );
}
/**
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() ) .
);
$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
&& $request->wasPosted()
) {
$user->clearAllNotifications();
- $output->redirect( $this->getTitle()->getFullURL( $nondefaults ) );
+ $output->redirect( $this->getPageTitle()->getFullURL( $nondefaults ) );
return;
}
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";
$form .= Xml::openElement( 'form', array(
'method' => 'post',
- 'action' => $this->getTitle()->getLocalURL(),
+ 'action' => $this->getPageTitle()->getLocalURL(),
'id' => 'mw-watchlist-form'
) );
$form .= Xml::fieldset(
$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
$message = ( $d ? $this->getLanguage()->formatNum( $d ) : $this->msg( 'watchlistall2' )->escaped() );
return Linker::linkKnown(
- $this->getTitle(),
+ $this->getPageTitle(),
$message,
array(),
$options
$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 );
protected function wlhLink( Title $target, $text ) {
static $title = null;
if ( $title === null ) {
- $title = $this->getTitle();
+ $title = $this->getPageTitle();
}
return Linker::linkKnown(
$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 );
}
}
$prefix = $this->prefix;
- $t = $this->getTitle();
+ $t = $this->getPageTitle();
return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
Html::openElement( 'fieldset' ) . "\n" .