The last checkin broke the wiki on installations where TMP is not set
[lhc/web/wiklou.git] / maintenance / update2.php
1 <?php
2
3 # This script was used to convert the live Wikimedia wikis from 1.2 to 1.3
4
5 $maintenance = "/home/wikipedia/common/php-new/maintenance";
6 require_once( "$maintenance/liveCmdLine.inc" );
7 require_once( "$maintenance/InitialiseMessages.inc" );
8 require_once( "$maintenance/updaters.inc" );
9 require_once( "$maintenance/archives/moveCustomMessages.inc" );
10 require_once( "$maintenance/convertLinks.inc" );
11 require_once( "$maintenance/../install-utils.inc" );
12
13 $wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
14 do_ipblocks_update(); flush();
15 do_interwiki_update(); flush();
16 do_index_update(); flush();
17 do_linkscc_update(); flush();
18 do_linkscc_1_3_update(); flush();
19 do_hitcounter_update(); flush();
20 do_recentchanges_update(); flush();
21 do_user_real_name_update(); flush();
22 do_querycache_update(); flush();
23 do_objectcache_update(); flush();
24 do_categorylinks_update(); flush();
25 initialiseMessages(); flush();
26 moveCustomMessages( 1 );
27
28 if ( file_exists( $wgReadOnlyFile ) ) {
29 $alreadyExists = true;
30 } else {
31 $file = fopen( $wgReadOnlyFile, "w" );
32 fwrite( $file, "The database is temporarily locked for a software upgrade\n" );
33 fclose( $file );
34 $alreadyExists = false;
35 }
36
37 convertLinks();
38
39 if ( !$alreadyExists ) {
40 unlink( $wgReadOnlyFile );
41 }
42
43 ?>