Committing various live hacks from Wikimedia servers
[lhc/web/wiklou.git] / maintenance / rebuildInterwiki.php
index 3f786d0..42888eb 100644 (file)
@@ -13,13 +13,13 @@ $oldCwd = getcwd();
 $optionsWithArgs = array( "o" );
 include_once( "commandLine.inc" );
 include_once( "rebuildInterwiki.inc" );
+chdir( $oldCwd );
 
 $sql = getRebuildInterwikiSQL();
 
 # Output
 if ( isset( $options['o'] ) ) {        
        # To file specified with -o
-       chdir( $oldCwd );
        $file = fopen( $options['o'], "w" );
        fwrite( $file, $sql );
        fclose( $file );