moving geo files to new experiments subdir
[lhc/web/wiklou.git] / maintenance / rebuildInterwiki.php
1 <?php
2 /**
3 * Rebuild interwiki table using the file on meta and the language list
4 * Wikimedia specific!
5 * @todo document
6 * @package MediaWiki
7 * @subpackage Maintenance
8 */
9
10 /** */
11 $oldCwd = getcwd();
12
13 $optionsWithArgs = array( "o" );
14 include_once( "commandLine.inc" );
15 include_once( "rebuildInterwiki.inc" );
16
17 $sql = getRebuildInterwikiSQL();
18
19 # Output
20 if ( isset( $options['o'] ) ) {
21 # To file specified with -o
22 chdir( $oldCwd );
23 $file = fopen( $options['o'], "w" );
24 fwrite( $file, $sql );
25 fclose( $file );
26 } else {
27 # To stdout
28 print $sql;
29 }
30
31 ?>