Followup r92044: force HTTP on URLs output by the API, now that wfExpandUrl() has a flag for this
This commit is contained in:
parent
a2bf7c35f7
commit
541aa4cbdd
7 changed files with 11 additions and 11 deletions
|
|
@ -353,7 +353,7 @@ class ApiParse extends ApiBase {
|
|||
|
||||
$entry['lang'] = $bits[0];
|
||||
if ( $title ) {
|
||||
$entry['url'] = wfExpandUrl( $title->getFullURL() );
|
||||
$entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
|
||||
}
|
||||
$this->getResult()->setContent( $entry, $bits[1] );
|
||||
$result[] = $entry;
|
||||
|
|
@ -435,7 +435,7 @@ class ApiParse extends ApiBase {
|
|||
|
||||
$title = Title::newFromText( "{$prefix}:{$title}" );
|
||||
if ( $title ) {
|
||||
$entry['url'] = wfExpandUrl( $title->getFullURL() );
|
||||
$entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
|
||||
}
|
||||
|
||||
$this->getResult()->setContent( $entry, $title->getFullText() );
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ class ApiQuery extends ApiBase {
|
|||
);
|
||||
if ( $this->iwUrl ) {
|
||||
$title = Title::newFromText( $rawTitleStr );
|
||||
$item['url'] = wfExpandUrl( $title->getFullURL() );
|
||||
$item['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
|
||||
}
|
||||
$intrwValues[] = $item;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class ApiQueryIWLinks extends ApiQueryBase {
|
|||
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_HTTP );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
|
|||
if ( !is_null( $thumbParams ) ) {
|
||||
$mto = $file->transform( $thumbParams );
|
||||
if ( $mto && !$mto->isError() ) {
|
||||
$vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
|
||||
$vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_HTTP );
|
||||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -380,8 +380,8 @@ class ApiQueryInfo extends ApiQueryBase {
|
|||
}
|
||||
|
||||
if ( $this->fld_url ) {
|
||||
$pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() );
|
||||
$pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) );
|
||||
$pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
|
||||
$pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_HTTP );
|
||||
}
|
||||
if ( $this->fld_readable && $title->userCanRead() ) {
|
||||
$pageInfo['readable'] = '';
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
|
|||
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_HTTP );
|
||||
}
|
||||
}
|
||||
ApiResult::setContent( $entry, $row->ll_title );
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
|
|||
$data = array();
|
||||
$mainPage = Title::newMainPage();
|
||||
$data['mainpage'] = $mainPage->getPrefixedText();
|
||||
$data['base'] = wfExpandUrl( $mainPage->getFullUrl() );
|
||||
$data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_HTTP );
|
||||
$data['sitename'] = $GLOBALS['wgSitename'];
|
||||
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
|
||||
$data['phpversion'] = phpversion();
|
||||
|
|
@ -288,7 +288,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
|
|||
if ( isset( $langNames[$prefix] ) ) {
|
||||
$val['language'] = $langNames[$prefix];
|
||||
}
|
||||
$val['url'] = wfExpandUrl( $row['iw_url'] );
|
||||
$val['url'] = wfExpandUrl( $row['iw_url'], PROTO_HTTP );
|
||||
if( isset( $row['iw_wikiid'] ) ) {
|
||||
$val['wikiid'] = $row['iw_wikiid'];
|
||||
}
|
||||
|
|
@ -456,7 +456,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
|
|||
protected function appendRightsInfo( $property ) {
|
||||
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
|
||||
$title = Title::newFromText( $wgRightsPage );
|
||||
$url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl;
|
||||
$url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_HTTP ) : $wgRightsUrl;
|
||||
$text = $wgRightsText;
|
||||
if ( !$text && $title ) {
|
||||
$text = $title->getPrefixedText();
|
||||
|
|
|
|||
Loading…
Reference in a new issue