wfEscapeWikiText( $this->title->getText() ),
$wgLang->date( $this->getTimestamp(), true ),
$wgLang->time( $this->getTimestamp(), true ),
- wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage ) ) );
+ wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage ), PROTO_CURRENT ) );
} else {
return wfMsgExt(
$message,
if ( $this->mRedirect != '' ) {
# Standards require redirect URLs to be absolute
- $this->mRedirect = wfExpandUrl( $this->mRedirect );
+ $this->mRedirect = wfExpandUrl( $this->mRedirect, PROTO_CURRENT );
if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) {
if( !$wgDebugRedirects ) {
$message = HttpStatus::getMessage( $this->mRedirectCode );
} else {
$tags[] = Html::element( 'link', array(
'rel' => 'canonical',
- 'href' => wfExpandUrl( $this->getTitle()->getFullURL(), PROTO_HTTP ) )
- );
+ 'href' => $this->getTitle()->getCanonicalUrl()
+ ) );
}
}
'raw' => true,
'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ),
- wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) )
+ wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
+ PROTO_CURRENT
+ ) )
),
'comment' => array(
'type' => 'text',
$this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ),
$this->getLang()->time( $timestamp, true ),
- wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) ) );
+ wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
+ PROTO_CURRENT
+ ) ) );
$this->getOutput()->returnToMain( false, $this->getTitle() );
}
$entry['lang'] = $bits[0];
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
$this->getResult()->setContent( $entry, $bits[1] );
$result[] = $entry;
$title = Title::newFromText( "{$prefix}:{$title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
$this->getResult()->setContent( $entry, $title->getFullText() );
);
if ( $this->iwUrl ) {
$title = Title::newFromText( $rawTitleStr );
- $item['url'] = wfExpandUrl( $title->getFullURL() );
+ $item['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
$intrwValues[] = $item;
}
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->iwl_prefix}:{$row->iwl_title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
}
if ( !is_null( $thumbParams ) ) {
$mto = $file->transform( $thumbParams );
if ( $mto && !$mto->isError() ) {
- $vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
+ $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT );
// bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
// thumbnail sizes for the thumbnail actual size
$vals['thumberror'] = $mto->toText();
}
}
- $vals['url'] = wfExpandUrl( $file->getFullURL() );
- $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl() );
+ $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT );
+ $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT );
}
if ( $sha1 ) {
}
if ( $this->fld_url ) {
- $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() );
- $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) );
+ $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
+ $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_CURRENT );
}
if ( $this->fld_readable && $title->userCanRead() ) {
$pageInfo['readable'] = '';
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT );
}
}
ApiResult::setContent( $entry, $row->ll_title );
$data = array();
$mainPage = Title::newMainPage();
$data['mainpage'] = $mainPage->getPrefixedText();
- $data['base'] = wfExpandUrl( $mainPage->getFullUrl() );
+ $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_CURRENT );
$data['sitename'] = $GLOBALS['wgSitename'];
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
$data['phpversion'] = phpversion();
if ( isset( $langNames[$prefix] ) ) {
$val['language'] = $langNames[$prefix];
}
- $val['url'] = wfExpandUrl( $row['iw_url'] );
+ $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
if( isset( $row['iw_wikiid'] ) ) {
$val['wikiid'] = $row['iw_wikiid'];
}
protected function appendRightsInfo( $property ) {
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
$title = Title::newFromText( $wgRightsPage );
- $url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl;
+ $url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ) : $wgRightsUrl;
$text = $wgRightsText;
if ( !$text && $title ) {
$text = $title->getPrefixedText();
$service = array( 'apis' => $this->formatRsdApiList() );
ApiResult::setContent( $service, 'MediaWiki', 'engineName' );
ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' );
- ApiResult::setContent( $service, wfExpandUrl( Title::newMainPage()->getFullURL() ), 'homePageLink' );
+ ApiResult::setContent( $service, Title::newMainPage()->getCanonicalUrl(), 'homePageLink' );
$result->setIndexedTagName( $service['apis'], 'api' );
$apis = array(
'MediaWiki' => array(
// The API link is required for all RSD API entries.
- 'apiLink' => wfExpandUrl( wfScript( 'api' ) ),
+ 'apiLink' => wfExpandUrl( wfScript( 'api' ), PROTO_CURRENT ),
// Docs link is optional, but recommended.
'docs' => 'http://www.mediawiki.org/wiki/API',