r68457 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68456‎ | r68457 | r68458 >
Date:16:06, 23 June 2010
Author:maxsem
Status:ok
Tags:
Comment:
Fixes for r66013: fixed syntax, switched interwiki.list to use more customary comments starting with #
Modified paths:
  • /trunk/phase3/includes/installer/InstallerDBType.php (modified) (history)
  • /trunk/phase3/maintenance/interwiki.list (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/interwiki.list
@@ -1,5 +1,5 @@
 2+# Based more or less on the public interwiki map from MeatballWiki
 3+# Default interwiki prefixes...
24 acronym|http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1|0
35 advogato|http://www.advogato.org/$1|0
46 annotationwiki|http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1|0
@@ -48,7 +48,7 @@
4949 oeis|http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=$1|0
5050 openfacts|http://openfacts.berlios.de/index.phtml?title=$1|0
5151 openwiki|http://openwiki.com/?$1|0
 52+# patwiki|http://gauss.ffii.org/$1|0 # 2008-02-27: lots of spambots
5253 pmeg|http://www.bertilow.com/pmeg/$1.php|0
5354 ppr|http://c2.com/cgi/wiki?$1|0
5455 pythoninfo|http://wiki.python.org/moin/$1|0
@@ -57,7 +57,7 @@
5858 seattlewiki|http://seattle.wikia.com/wiki/$1|0
5959 seattlewireless|http://seattlewireless.net/?$1|0
6060 senseislibrary|http://senseis.xmp.net/?$1|0
 61+# slashdot|http://slashdot.org/article.pl?sid=$1|0 # 2008-02-27: update me
6162 sourceforge|http://sourceforge.net/$1|0
6263 squeak|http://wiki.squeak.org/squeak/$1|0
6364 susning|http://www.susning.nu/$1|0
Index: trunk/phase3/includes/installer/InstallerDBType.php
@@ -350,7 +350,8 @@
351351 return Status::newFatal( 'config-install-interwiki-sql' );
352352 }
353353 foreach( $rows as $row ) {
354 - if( substr( $row, 0, 2 ) == '--' ) continue; // skip comments -- Whee
 354+ $row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee
 355+ if ( $row == "" ) continue;
355356 $interwikis[] = array_combine(
356357 array( 'iw_prefix', 'iw_url', 'iw_local' ),
357358 explode( '|', $row )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66013Stop using mySQL-specific interwiki.sql, broke this into new file interwiki.l...demon13:51, 7 May 2010

Status & tagging log