Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1812,7 +1812,7 @@ |
1813 | 1813 | |
1814 | 1814 | if ( $this->mRedirect != '' ) { |
1815 | 1815 | # Standards require redirect URLs to be absolute |
1816 | | - $this->mRedirect = wfExpandUrl( $this->mRedirect ); |
| 1816 | + $this->mRedirect = wfExpandUrl( $this->mRedirect, PROTO_CURRENT ); |
1817 | 1817 | if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) { |
1818 | 1818 | if( !$wgDebugRedirects ) { |
1819 | 1819 | $message = HttpStatus::getMessage( $this->mRedirectCode ); |
— | — | @@ -2822,8 +2822,8 @@ |
2823 | 2823 | } else { |
2824 | 2824 | $tags[] = Html::element( 'link', array( |
2825 | 2825 | 'rel' => 'canonical', |
2826 | | - 'href' => wfExpandUrl( $this->getTitle()->getFullURL(), PROTO_HTTP ) ) |
2827 | | - ); |
| 2826 | + 'href' => $this->getTitle()->getCanonicalUrl() |
| 2827 | + ) ); |
2828 | 2828 | } |
2829 | 2829 | } |
2830 | 2830 | |
Index: trunk/phase3/includes/actions/RevertAction.php |
— | — | @@ -96,7 +96,9 @@ |
97 | 97 | 'raw' => true, |
98 | 98 | 'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(), |
99 | 99 | $this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ), |
100 | | - wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) ) |
| 100 | + wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ), |
| 101 | + PROTO_CURRENT |
| 102 | + ) ) |
101 | 103 | ), |
102 | 104 | 'comment' => array( |
103 | 105 | 'type' => 'text', |
— | — | @@ -119,7 +121,9 @@ |
120 | 122 | $this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(), |
121 | 123 | $this->getLang()->date( $timestamp, true ), |
122 | 124 | $this->getLang()->time( $timestamp, true ), |
123 | | - wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) ) ); |
| 125 | + wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ), |
| 126 | + PROTO_CURRENT |
| 127 | + ) ) ); |
124 | 128 | $this->getOutput()->returnToMain( false, $this->getTitle() ); |
125 | 129 | } |
126 | 130 | |
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | $data = array(); |
120 | 120 | $mainPage = Title::newMainPage(); |
121 | 121 | $data['mainpage'] = $mainPage->getPrefixedText(); |
122 | | - $data['base'] = wfExpandUrl( $mainPage->getFullUrl() ); |
| 122 | + $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_CURRENT ); |
123 | 123 | $data['sitename'] = $GLOBALS['wgSitename']; |
124 | 124 | $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}"; |
125 | 125 | $data['phpversion'] = phpversion(); |
— | — | @@ -297,7 +297,7 @@ |
298 | 298 | if ( isset( $langNames[$prefix] ) ) { |
299 | 299 | $val['language'] = $langNames[$prefix]; |
300 | 300 | } |
301 | | - $val['url'] = wfExpandUrl( $row['iw_url'] ); |
| 301 | + $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT ); |
302 | 302 | if( isset( $row['iw_wikiid'] ) ) { |
303 | 303 | $val['wikiid'] = $row['iw_wikiid']; |
304 | 304 | } |
— | — | @@ -465,7 +465,7 @@ |
466 | 466 | protected function appendRightsInfo( $property ) { |
467 | 467 | global $wgRightsPage, $wgRightsUrl, $wgRightsText; |
468 | 468 | $title = Title::newFromText( $wgRightsPage ); |
469 | | - $url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl; |
| 469 | + $url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ) : $wgRightsUrl; |
470 | 470 | $text = $wgRightsText; |
471 | 471 | if ( !$text && $title ) { |
472 | 472 | $text = $title->getPrefixedText(); |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -361,7 +361,7 @@ |
362 | 362 | |
363 | 363 | $entry['lang'] = $bits[0]; |
364 | 364 | if ( $title ) { |
365 | | - $entry['url'] = wfExpandUrl( $title->getFullURL() ); |
| 365 | + $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
366 | 366 | } |
367 | 367 | $this->getResult()->setContent( $entry, $bits[1] ); |
368 | 368 | $result[] = $entry; |
— | — | @@ -443,7 +443,7 @@ |
444 | 444 | |
445 | 445 | $title = Title::newFromText( "{$prefix}:{$title}" ); |
446 | 446 | if ( $title ) { |
447 | | - $entry['url'] = wfExpandUrl( $title->getFullURL() ); |
| 447 | + $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
448 | 448 | } |
449 | 449 | |
450 | 450 | $this->getResult()->setContent( $entry, $title->getFullText() ); |
Index: trunk/phase3/includes/api/ApiQuery.php |
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | ); |
376 | 376 | if ( $this->iwUrl ) { |
377 | 377 | $title = Title::newFromText( $rawTitleStr ); |
378 | | - $item['url'] = wfExpandUrl( $title->getFullURL() ); |
| 378 | + $item['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
379 | 379 | } |
380 | 380 | $intrwValues[] = $item; |
381 | 381 | } |
Index: trunk/phase3/includes/api/ApiQueryIWLinks.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | if ( $params['url'] ) { |
114 | 114 | $title = Title::newFromText( "{$row->iwl_prefix}:{$row->iwl_title}" ); |
115 | 115 | if ( $title ) { |
116 | | - $entry['url'] = wfExpandUrl( $title->getFullURL() ); |
| 116 | + $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | if ( $params['url'] ) { |
108 | 108 | $title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" ); |
109 | 109 | if ( $title ) { |
110 | | - $entry['url'] = wfExpandUrl( $title->getFullURL() ); |
| 110 | + $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
111 | 111 | } |
112 | 112 | } |
113 | 113 | ApiResult::setContent( $entry, $row->ll_title ); |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -348,7 +348,7 @@ |
349 | 349 | if ( !is_null( $thumbParams ) ) { |
350 | 350 | $mto = $file->transform( $thumbParams ); |
351 | 351 | if ( $mto && !$mto->isError() ) { |
352 | | - $vals['thumburl'] = wfExpandUrl( $mto->getUrl() ); |
| 352 | + $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT ); |
353 | 353 | |
354 | 354 | // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted |
355 | 355 | // thumbnail sizes for the thumbnail actual size |
— | — | @@ -370,8 +370,8 @@ |
371 | 371 | $vals['thumberror'] = $mto->toText(); |
372 | 372 | } |
373 | 373 | } |
374 | | - $vals['url'] = wfExpandUrl( $file->getFullURL() ); |
375 | | - $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl() ); |
| 374 | + $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT ); |
| 375 | + $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT ); |
376 | 376 | } |
377 | 377 | |
378 | 378 | if ( $sha1 ) { |
Index: trunk/phase3/includes/api/ApiRsd.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | $service = array( 'apis' => $this->formatRsdApiList() ); |
50 | 50 | ApiResult::setContent( $service, 'MediaWiki', 'engineName' ); |
51 | 51 | ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' ); |
52 | | - ApiResult::setContent( $service, wfExpandUrl( Title::newMainPage()->getFullURL() ), 'homePageLink' ); |
| 52 | + ApiResult::setContent( $service, Title::newMainPage()->getCanonicalUrl(), 'homePageLink' ); |
53 | 53 | |
54 | 54 | $result->setIndexedTagName( $service['apis'], 'api' ); |
55 | 55 | |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | $apis = array( |
100 | 100 | 'MediaWiki' => array( |
101 | 101 | // The API link is required for all RSD API entries. |
102 | | - 'apiLink' => wfExpandUrl( wfScript( 'api' ) ), |
| 102 | + 'apiLink' => wfExpandUrl( wfScript( 'api' ), PROTO_CURRENT ), |
103 | 103 | |
104 | 104 | // Docs link is optional, but recommended. |
105 | 105 | 'docs' => 'http://www.mediawiki.org/wiki/API', |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -380,8 +380,8 @@ |
381 | 381 | } |
382 | 382 | |
383 | 383 | if ( $this->fld_url ) { |
384 | | - $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() ); |
385 | | - $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) ); |
| 384 | + $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
| 385 | + $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_CURRENT ); |
386 | 386 | } |
387 | 387 | if ( $this->fld_readable && $title->userCanRead() ) { |
388 | 388 | $pageInfo['readable'] = ''; |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | wfEscapeWikiText( $this->title->getText() ), |
258 | 258 | $wgLang->date( $this->getTimestamp(), true ), |
259 | 259 | $wgLang->time( $this->getTimestamp(), true ), |
260 | | - wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage ) ) ); |
| 260 | + wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage ), PROTO_CURRENT ) ); |
261 | 261 | } else { |
262 | 262 | return wfMsgExt( |
263 | 263 | $message, |