Fix for compatibility with short_open_tag = Off
[lhc/web/wiklou.git] / maintenance / rebuildall.php
1 <?php
2
3 # Rebuild link tracking tables from scratch. This takes several
4 # hours, depending on the database size and server configuration.
5
6 if ( ! is_readable( "../LocalSettings.php" ) ) {
7 print "A copy of your installation's LocalSettings.php\n" .
8 "must exist in the source directory.\n";
9 exit();
10 }
11
12 $wgCommandLineMode = true;
13 $DP = "../includes";
14 include_once( "../LocalSettings.php" );
15 include_once( "../AdminSettings.php" );
16
17 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
18 ini_set( "include_path", "$IP$sep$include_path" );
19
20 include_once( "Setup.php" );
21 include_once( "./rebuildlinks.inc" );
22 include_once( "./rebuildtextindex.inc" );
23 include_once( "./rebuildrecentchanges.inc" );
24 $wgTitle = Title::newFromText( "Rebuild links script" );
25 set_time_limit(0);
26
27 $wgDBuser = $wgDBadminuser;
28 $wgDBpassword = $wgDBadminpassword;
29
30 rebuildLinkTables();
31
32 dropTextIndex();
33 rebuildTextIndex();
34 createTextIndex();
35
36 rebuildRecentChangesTablePass1();
37 rebuildRecentChangesTablePass2();
38
39 print "Done.\n";
40 exit();
41
42 ?>