From fbdba8b26f2777ce3cb318e4f8a6f3d45eeed745 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 3 Aug 2011 07:54:23 +0000 Subject: [PATCH] Revert r93802 per CR. Will avoid cache pollution by splitting the cache instead --- includes/api/ApiParse.php | 4 ++-- includes/api/ApiQuery.php | 2 +- includes/api/ApiQueryIWLinks.php | 2 +- includes/api/ApiQueryImageInfo.php | 2 +- includes/api/ApiQueryInfo.php | 4 ++-- includes/api/ApiQueryLangLinks.php | 2 +- includes/api/ApiQuerySiteinfo.php | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 0c674459b0..6450917ffc 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -353,7 +353,7 @@ class ApiParse extends ApiBase { $entry['lang'] = $bits[0]; if ( $title ) { - $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP ); + $entry['url'] = wfExpandUrl( $title->getFullURL() ); } $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(), PROTO_HTTP ); + $entry['url'] = wfExpandUrl( $title->getFullURL() ); } $this->getResult()->setContent( $entry, $title->getFullText() ); diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index b9ee7fd382..61f18925ea 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -374,7 +374,7 @@ class ApiQuery extends ApiBase { ); if ( $this->iwUrl ) { $title = Title::newFromText( $rawTitleStr ); - $item['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP ); + $item['url'] = wfExpandUrl( $title->getFullURL() ); } $intrwValues[] = $item; } diff --git a/includes/api/ApiQueryIWLinks.php b/includes/api/ApiQueryIWLinks.php index 6f370518c6..547c40b56b 100644 --- a/includes/api/ApiQueryIWLinks.php +++ b/includes/api/ApiQueryIWLinks.php @@ -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(), PROTO_HTTP ); + $entry['url'] = wfExpandUrl( $title->getFullURL() ); } } diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index fe239a974f..3e435baa9f 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -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(), PROTO_HTTP ); + $vals['thumburl'] = wfExpandUrl( $mto->getUrl() ); // 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 diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index c9e23093d9..818de5cc70 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -380,8 +380,8 @@ class ApiQueryInfo extends ApiQueryBase { } if ( $this->fld_url ) { - $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP ); - $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_HTTP ); + $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() ); + $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) ); } if ( $this->fld_readable && $title->userCanRead() ) { $pageInfo['readable'] = ''; diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php index 1468383f77..21a5dfd515 100644 --- a/includes/api/ApiQueryLangLinks.php +++ b/includes/api/ApiQueryLangLinks.php @@ -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(), PROTO_HTTP ); + $entry['url'] = wfExpandUrl( $title->getFullURL() ); } } ApiResult::setContent( $entry, $row->ll_title ); diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index e1e1056da6..328decbae8 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -117,7 +117,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data = array(); $mainPage = Title::newMainPage(); $data['mainpage'] = $mainPage->getPrefixedText(); - $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_HTTP ); + $data['base'] = wfExpandUrl( $mainPage->getFullUrl() ); $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'], PROTO_HTTP ); + $val['url'] = wfExpandUrl( $row['iw_url'] ); 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(), PROTO_HTTP ) : $wgRightsUrl; + $url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl; $text = $wgRightsText; if ( !$text && $title ) { $text = $title->getPrefixedText(); -- 2.20.1