} 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( "<div class='mw-warning plainlinks'>\n$1\n</div>\n",
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;
// 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;
}
// 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 );
}
* @return string
*/
function homelink() {
- return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalUrl() );
+ return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalURL() );
}
/**
" " . $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" .
$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() );
$q['oldimage'] = $this->oldimage;
}
- return $this->title->getLocalUrl( $q );
+ return $this->title->getLocalURL( $q );
}
/**
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" );
}
return wfAppendQuery( $wgUploadNavigationUrl, $q );
} else {
$upload = SpecialPage::getTitleFor( 'Upload' );
- return $upload->getLocalUrl( $q );
+ return $upload->getLocalURL( $q );
}
}
* @param $title Title
*/
protected function page( $name, $title ) {
- $this->url( $name, $title->getFullUrl() );
+ $this->url( $name, $title->getFullURL() );
}
protected function url( $name, $url ) {
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();
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)' ) );
}
$s = array();
if ( !$wgOut->isPrintable() ) {
- $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl(
+ $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalURL(
$wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
$s[] = "<a href=\"$printurl\" rel=\"alternate\">"
. wfMessage( 'printableversion' )->text() . '</a>';
return array(
'class' => implode( ' ', $classes ),
'text' => $text,
- 'href' => $title->getLocalUrl( $query ),
+ 'href' => $title->getLocalURL( $query ),
'primary' => true );
}
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(
if ( $this->getTitle()->getArticleID() ) {
$nav_urls['recentchangeslinked'] = array(
- 'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalUrl()
+ 'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalURL()
);
}
}
$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
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;
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();
}
/**
$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;
}
$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)
} 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;
}
/**
- * 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!)
$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
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()
);
}
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()
);
}
}
}
public function onSuccess() {
- $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->redirectParams ) );
+ $this->getOutput()->redirect( $this->getTitle()->getFullURL( $this->redirectParams ) );
}
}
$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();
$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' );
}
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 ) ),
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( "<div id='mw-$msg' class='mw-warning plainlinks'>\n$1\n</div>\n", array( $msg, $link ) );
}
* @return String
*/
function getDescriptionUrl() {
- return $this->title->getLocalUrl();
+ return $this->title->getLocalURL();
}
/**
));
$titleObj = SpecialPage::getTitleFor( 'Booksources', $num );
return'<a href="' .
- htmlspecialchars( $titleObj->getLocalUrl() ) .
+ htmlspecialchars( $titleObj->getLocalURL() ) .
"\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>";
} else {
return $m[0];
return wfMessage( 'scarytranscludedisabled' )->inContentLanguage()->text();
}
- $url = $title->getFullUrl( "action=$action" );
+ $url = $title->getFullURL( "action=$action" );
if ( strlen( $url ) > 255 ) {
return wfMessage( 'scarytranscludetoolong' )->inContentLanguage()->text();
}
$link = htmlspecialchars(
- $this->getTitle()->getLocalUrl( $queryParams ) );
+ $this->getTitle()->getLocalURL( $queryParams ) );
$out = $this->msg( 'alphaindexline' )->rawParams(
"<a href=\"$link\">$inpointf</a></td><td>",
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;
}
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" .
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" .
$out->wrapWikiMsg( "<div class=\"error mw-confirmemail-pending\">\n$1\n</div>", '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' );
$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' ) ) . '<br />';
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();
$feed = new $wgFeedClasses[$type](
$this->feedTitle(),
$this->msg( 'tagline' )->text(),
- $this->getTitle()->getFullUrl()
+ $this->getTitle()->getFullURL()
);
$pager = new NewPagesPager( $this, $this->opts );
),
), $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() );
$username,
$passwordBlock,
count( $passwords ),
- '<' . Title::newMainPage()->getCanonicalUrl() . '>',
+ '<' . Title::newMainPage()->getCanonicalURL() . '>',
round( $wgNewPasswordExpiry / 86400 )
);
$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 ) );
}
/**
$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 );
}
$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 ) ) )
// 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() .
$mode = null;
}
$title = SpecialPage::getTitleFor( 'EditWatchlist', $mode );
- $output->redirect( $title->getLocalUrl() );
+ $output->redirect( $title->getLocalURL() );
return;
}
$request->wasPosted() )
{
$user->clearAllNotifications();
- $output->redirect( $this->getTitle()->getFullUrl( $nondefaults ) );
+ $output->redirect( $this->getTitle()->getFullURL( $nondefaults ) );
return;
}
}
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" .
$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 .= "<hr />\n<p>";
$form .= Html::namespaceSelector(
array(
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" );
}
} elseif ( $page !== '' ) {
$title = Title::newFromText( $page );
if ( $title ) {
- $url = $title->getInternalUrl();
+ $url = $title->getInternalURL();
$this->output( "$url\n" );
$urls[] = $url;
if ( $this->getOption( 'purge' ) ) {
$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__,
$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;
}
# ** 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,
),