r100798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100797‎ | r100798 | r100799 >
Date:09:21, 26 October 2011
Author:catrope
Status:ok
Tags:
Comment:
Remove some code in dumpInterwiki.php that's too smart for its own good and forces interwiki links to URLs that look like they could be WMF wikis to protocol-relative. Instead, we should just trust the folks maintaining [[m:Interwiki map]] to make the right call
Modified paths:
  • /trunk/extensions/WikimediaMaintenance/dumpInterwiki.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMaintenance/dumpInterwiki.php
@@ -141,13 +141,6 @@
142142
143143 $url = $matches[2];
144144 if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia|wikinews|wikiversity|wikimediafoundation|mediawiki)\.org/', $url ) ) {
145 - if ( $this->hasOption( 'protocolrelative' ) ) {
146 - if ( substr( $url, 0, 5 ) == 'http:' ) {
147 - $url = substr( $url, 5 );
148 - } else if ( substr( $url, 0, 6 ) == 'https:' ) {
149 - $url = substr( $url, 6 );
150 - }
151 - }
152145 $local = 1;
153146 } else {
154147 $local = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r1007991.18wmf1: MFT r100798catrope09:24, 26 October 2011

Status & tagging log