Revert r93802 per CR. Will avoid cache pollution by splitting the cache instead
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 3 Aug 2011 07:54:23 +0000 (07:54 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 3 Aug 2011 07:54:23 +0000 (07:54 +0000)
includes/api/ApiParse.php
includes/api/ApiQuery.php
includes/api/ApiQueryIWLinks.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLangLinks.php
includes/api/ApiQuerySiteinfo.php

index 0c67445..6450917 100644 (file)
@@ -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() );
index b9ee7fd..61f1892 100644 (file)
@@ -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;
                }
index 6f37051..547c40b 100644 (file)
@@ -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() );
                                }
                        }
 
index fe239a9..3e435ba 100644 (file)
@@ -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
index c9e2309..818de5c 100644 (file)
@@ -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'] = '';
index 1468383..21a5dfd 100644 (file)
@@ -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 );
index e1e1056..328decb 100644 (file)
@@ -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();