expand comment
[lhc/web/wiklou.git] / maintenance / rebuildInterwiki.php
1 <?
2
3 # Rebuild interwiki table using the file on meta and the language list
4 # Wikimedia specific!
5 $oldCwd = getcwd();
6
7 $optionsWithArgs = array( "o" );
8 include_once( "commandLine.inc" );
9 include_once( "rebuildInterwiki.inc" );
10
11 $sql = getRebuildInterwikiSQL();
12
13 # Output
14 if ( isset( $options['o'] ) ) {
15 # To file specified with -o
16 chdir( $oldCwd );
17 $file = fopen( $options['o'], "w" );
18 fwrite( $file, $sql );
19 fclose( $file );
20 } else {
21 # To stdout
22 print $sql;
23 }
24
25 ?>