Skip to content

Instantly share code, notes, and snippets.

@Southparkfan
Created November 22, 2014 20:47
Show Gist options
  • Save Southparkfan/dd98a43575abe87715cd to your computer and use it in GitHub Desktop.
Save Southparkfan/dd98a43575abe87715cd to your computer and use it in GitHub Desktop.
wmgclosedwikis
$DBlist = array_map( 'trim', file( "$IP/all.dblist" ) );
$wgLocalDatabases = array();
foreach ( $DBlist as $wiki ) {
$wikinotags = explode( '|', $wiki, 4 );
list( $DBname, $siteName, $siteLang, $wikiTagList ) = array_pad( $wikinotags, 4, '' );
$wgLocalDatabases[] = $DBname;
if ( strpos( '|closed', $wiki ) ) {
$wmgClosedWikis[] = $DBname;
}
$wgConf->settings['wgSitename'][$DBname] = $siteName;
$wgConf->settings['wgLanguageCode'][$DBname] = $siteLang;
if ( $DBname == $wgDBname ) {
$wikiTags = array_filter( explode( '|', $wikiTagList ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment