Fix for compatibility with short_open_tag = Off
[lhc/web/wiklou.git] / maintenance / rebuildlinks.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 ini_set("implicit_flush", 1);
14
15 $DP = "../includes";
16 include_once( "../LocalSettings.php" );
17 include_once( "../AdminSettings.php" );
18
19 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
20 ini_set( "include_path", "$IP$sep$include_path" );
21
22 include_once( "Setup.php" );
23 include_once( "./rebuildlinks.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 print "Done.\n";
33 exit();
34
35 ?>