r93806 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93805‎ | r93806 | r93807 >
Date:07:54, 3 August 2011
Author:catrope
Status:ok
Tags:
Comment:
Revert r93802 per CR. Will avoid cache pollution by splitting the cache instead
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuery.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryIWLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLangLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -117,7 +117,7 @@
118118 $data = array();
119119 $mainPage = Title::newMainPage();
120120 $data['mainpage'] = $mainPage->getPrefixedText();
121 - $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_HTTP );
 121+ $data['base'] = wfExpandUrl( $mainPage->getFullUrl() );
122122 $data['sitename'] = $GLOBALS['wgSitename'];
123123 $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
124124 $data['phpversion'] = phpversion();
@@ -288,7 +288,7 @@
289289 if ( isset( $langNames[$prefix] ) ) {
290290 $val['language'] = $langNames[$prefix];
291291 }
292 - $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_HTTP );
 292+ $val['url'] = wfExpandUrl( $row['iw_url'] );
293293 if( isset( $row['iw_wikiid'] ) ) {
294294 $val['wikiid'] = $row['iw_wikiid'];
295295 }
@@ -456,7 +456,7 @@
457457 protected function appendRightsInfo( $property ) {
458458 global $wgRightsPage, $wgRightsUrl, $wgRightsText;
459459 $title = Title::newFromText( $wgRightsPage );
460 - $url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_HTTP ) : $wgRightsUrl;
 460+ $url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl;
461461 $text = $wgRightsText;
462462 if ( !$text && $title ) {
463463 $text = $title->getPrefixedText();
Index: trunk/phase3/includes/api/ApiParse.php
@@ -353,7 +353,7 @@
354354
355355 $entry['lang'] = $bits[0];
356356 if ( $title ) {
357 - $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
 357+ $entry['url'] = wfExpandUrl( $title->getFullURL() );
358358 }
359359 $this->getResult()->setContent( $entry, $bits[1] );
360360 $result[] = $entry;
@@ -435,7 +435,7 @@
436436
437437 $title = Title::newFromText( "{$prefix}:{$title}" );
438438 if ( $title ) {
439 - $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
 439+ $entry['url'] = wfExpandUrl( $title->getFullURL() );
440440 }
441441
442442 $this->getResult()->setContent( $entry, $title->getFullText() );
Index: trunk/phase3/includes/api/ApiQuery.php
@@ -374,7 +374,7 @@
375375 );
376376 if ( $this->iwUrl ) {
377377 $title = Title::newFromText( $rawTitleStr );
378 - $item['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
 378+ $item['url'] = wfExpandUrl( $title->getFullURL() );
379379 }
380380 $intrwValues[] = $item;
381381 }
Index: trunk/phase3/includes/api/ApiQueryIWLinks.php
@@ -112,7 +112,7 @@
113113 if ( $params['url'] ) {
114114 $title = Title::newFromText( "{$row->iwl_prefix}:{$row->iwl_title}" );
115115 if ( $title ) {
116 - $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
 116+ $entry['url'] = wfExpandUrl( $title->getFullURL() );
117117 }
118118 }
119119
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php
@@ -106,7 +106,7 @@
107107 if ( $params['url'] ) {
108108 $title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" );
109109 if ( $title ) {
110 - $entry['url'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
 110+ $entry['url'] = wfExpandUrl( $title->getFullURL() );
111111 }
112112 }
113113 ApiResult::setContent( $entry, $row->ll_title );
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -348,7 +348,7 @@
349349 if ( !is_null( $thumbParams ) ) {
350350 $mto = $file->transform( $thumbParams );
351351 if ( $mto && !$mto->isError() ) {
352 - $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_HTTP );
 352+ $vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
353353
354354 // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
355355 // thumbnail sizes for the thumbnail actual size
Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -380,8 +380,8 @@
381381 }
382382
383383 if ( $this->fld_url ) {
384 - $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_HTTP );
385 - $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_HTTP );
 384+ $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() );
 385+ $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) );
386386 }
387387 if ( $this->fld_readable && $title->userCanRead() ) {
388388 $pageInfo['readable'] = '';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93802Followup r92044: force HTTP on URLs output by the API, now that wfExpandUrl()...catrope07:05, 3 August 2011

Status & tagging log