}
function getRebuildInterwikiSQL() {
- global $langlist, $languageAliases, $prefixRewrites, $wgDBname;
+ global $langlist, $languageAliases, $prefixRewrites;
# Multi-language sites
# db suffix => db suffix, iw prefix, hostname
$iwArray = array();
foreach ( $lines as $line ) {
- if ( preg_match( '/^\|\s*(.*?)\s*\|\|\s*(.*?)\s*$/', $line, $matches ) ) {
+ $matches = array();
+ if ( preg_match( '/^\|\s*(.*?)\s*\|\|\s*(https?:\/\/.*?)\s*$/', $line, $matches ) ) {
$prefix = strtolower( $matches[1] );
$url = $matches[2];
if ( preg_match( '/(wikipedia|wiktionary|wikisource|wikiquote|wikibooks|wikimedia)\.org/', $url ) ) {