tweak "remembermypassword" for consistency with "tog-rememberpassword" (follow-up...
[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 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 * @ingroup Maintenance
22 */
23
24 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
25
26 class RebuildAll extends Maintenance {
27 public function __construct() {
28 parent::__construct();
29 $this->mDescription = "Rebuild links, text index and recent changes";
30 }
31
32 public function execute() {
33 global $wgDBtype;
34 // Rebuild the text index
35 if ( $wgDBtype != 'postgres' ) {
36 $this->output( "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n" );
37 $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
38 $rebuildText->execute();
39 }
40
41 // Rebuild RC
42 $this->output( "\n\n** Rebuilding recentchanges table:\n" );
43 $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' );
44 $rebuildRC->execute();
45
46 // Rebuild link tables
47 $this->output( "\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" );
48 $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' );
49 $rebuildLinks->execute();
50
51 $this->output( "Done.\n" );
52 }
53 }
54
55 $maintClass = "RebuildAll";
56 require_once( DO_MAINTENANCE );