* kw (new), el
[mediawiki.git] / maintenance / rebuildInterwiki.php
blobbc0a0008d7d5ce2dbd73bb3202bde63798102657
1 <?php
2 /**
3 * Rebuild interwiki table using the file on meta and the language list
4 * Wikimedia specific!
5 * @todo document
6 * @addtogroup Maintenance
7 */
9 /** */
10 $oldCwd = getcwd();
12 $optionsWithArgs = array( "o" );
13 include_once( "commandLine.inc" );
14 include_once( "rebuildInterwiki.inc" );
15 chdir( $oldCwd );
17 $sql = getRebuildInterwikiSQL();
19 # Output
20 if ( isset( $options['o'] ) ) {
21 # To file specified with -o
22 $file = fopen( $options['o'], "w" );
23 fwrite( $file, $sql );
24 fclose( $file );
25 } else {
26 # To stdout
27 print $sql;