blob: ca7e4c066fe2c5afa3c2bbe64ac6d935ae721ba4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
/**
* Rebuild link tracking tables from scratch. This takes several
* hours, depending on the database size and server configuration.
*
* @file
* @todo document
* @ingroup Maintenance
*/
/** */
require_once( "commandLine.inc" );
#require_once( "rebuildlinks.inc" );
require_once( "refreshLinks.inc" );
require_once( "rebuildtextindex.inc" );
require_once( "rebuildrecentchanges.inc" );
$dbclass = 'Database' . ucfirst( $wgDBtype ) ;
$database = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
if ($wgDBtype == 'mysql') {
print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
dropTextIndex( $database );
rebuildTextIndex( $database );
createTextIndex( $database );
}
print "\n\n** Rebuilding recentchanges table:\n";
rebuildRecentChangesTable();
# Doesn't work anymore
# rebuildLinkTables();
# Use the slow incomplete one instead. It's designed to work in the background
print "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to abort via ctrl+C if you get bored.\n";
refreshLinks( 1 );
print "Done.\n";
exit();
|