r93821 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93820‎ | r93821 | r93822 >
Date:13:11, 3 August 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Fix r93820: PROT_ -> PROTO_
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -3321,7 +3321,7 @@
33223322 '$1',
33233323 "Special:$page/$token",
33243324 $wgArticlePath ),
3325 - PROT_HTTP
 3325+ PROTO_HTTP
33263326 );
33273327 }
33283328
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -723,7 +723,7 @@
724724 // ... and we can
725725 if ( $mto && !$mto->isError() ) {
726726 // ... change the URL to point to a thumbnail.
727 - $url = wfExpandUrl( $mto->getUrl(), PROT_RELATIVE );
 727+ $url = wfExpandUrl( $mto->getUrl(), PROTO_RELATIVE );
728728 }
729729 }
730730 if ( $option == 'nowiki' ) {
Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -370,7 +370,7 @@
371371 public static function httpGet( $url, $timeout = 'default', $options = array() ) {
372372 $options['timeout'] = $timeout;
373373 /* Http::get */
374 - $url = wfExpandUrl( $url, PROT_HTTP );
 374+ $url = wfExpandUrl( $url, PROTO_HTTP );
375375 wfDebug( "ForeignAPIRepo: HTTP GET: $url\n" );
376376 $options['method'] = "GET";
377377
Index: trunk/phase3/includes/OutputPage.php
@@ -2820,7 +2820,7 @@
28212821 'type' => 'application/rsd+xml',
28222822 // Output a protocol-relative URL here if $wgServer is protocol-relative
28232823 // Whether RSD accepts relative or protocol-relative URLs is completely undocumented, though
2824 - 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ), PROT_RELATIVE ),
 2824+ 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ), PROTO_RELATIVE ),
28252825 ) );
28262826 }
28272827
Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php
@@ -206,7 +206,7 @@
207207 }
208208 // Make sure the remote base path is a complete valid URL,
209209 // but possibly protocol-relative to avoid cache pollution
210 - $this->remoteBasePath = wfExpandUrl( $this->remoteBasePath, PROT_RELATIVE );
 210+ $this->remoteBasePath = wfExpandUrl( $this->remoteBasePath, PROTO_RELATIVE );
211211 }
212212
213213 /**
Index: trunk/phase3/includes/libs/CSSMin.php
@@ -138,7 +138,7 @@
139139 $expanded = wfExpandUrl( $match['file'][0] );
140140 $origLength = strlen( $match['file'][0] );
141141 $lengthIncrease = strlen( $expanded ) - $origLength;
142 - $source = substr_replace( $source, wfExpandUrl( $match['file'][0], PROT_RELATIVE ),
 142+ $source = substr_replace( $source, wfExpandUrl( $match['file'][0], PROTO_RELATIVE ),
143143 $match['file'][1], $origLength,
144144 );
145145 }
Index: trunk/phase3/includes/HttpFunctions.php
@@ -32,7 +32,7 @@
3333 * @return Mixed: (bool)false on failure or a string on success
3434 */
3535 public static function request( $method, $url, $options = array() ) {
36 - $url = wfExpandUrl( $url, PROT_HTTP );
 36+ $url = wfExpandUrl( $url, PROTO_HTTP );
3737 wfDebug( "HTTP: $method: $url\n" );
3838 $options['method'] = strtoupper( $method );
3939

Follow-up revisions

RevisionCommit summaryAuthorDate
r938901.17wmf1: MFT rest of protocol-relative URL fixes and API cache splitting sup...catrope15:02, 4 August 2011
r94472MFT to REL1_18:...hashar19:43, 14 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93820Some random URL protocol forcing for protocol-relative URLscatrope12:58, 3 August 2011

Comments

#Comment by Platonides (talk | contribs)   13:48, 3 August 2011

Sorry, seems I confused you.

#Comment by Catrope (talk | contribs)   13:01, 10 August 2011

No worries. I'd seen the PROT_ -> PROTO_ rename before, but PROT_ was still in my muscle memory.

Status & tagging log