r94458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r94457‎ | r94458 | r94459 >
Date:14:07, 14 August 2011
Author:dantman
Status:ok
Tags:
Comment:
Followup r94375; Use PROTO_RELATIVE so that when $wgServer is a protocol relative url we don't potentially polute the cache if getFullURL is called by an extension that outputs to cache. getFullURL includes a #fragment so it's more likely that extensions outputting urls in situations that don't support protocol relative urls are using getLocalURL and expanding it.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
——@@ -843,7 +843,7 @@
844844 # Expand the url to make it a full url. Note that getLocalURL has the
845845 # potential to output full urls for a variety of reasons, so we use
846846 # wfExpandUrl instead of simply prepending $wgServer
847 - $url = wfExpandUrl( $url );
 847+ $url = wfExpandUrl( $url, PROTO_RELATIVE );
848848
849849 # Finally, add the fragment.
850850 $url .= $this->getFragmentForURL();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94375Touch up Title::get[Full|Local]URL. This concept of "if not an existing inter...dantman19:55, 12 August 2011

Status & tagging log