From e19087423a24a2cfa8d90b9c6ecbebe76bc90bf0 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 20 Jun 2010 17:54:07 +0000 Subject: [PATCH] Delete r68326. Too many fixmes and I don't care right now. --- maintenance/nukeEntireWiki.php | 48 ---------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 maintenance/nukeEntireWiki.php diff --git a/maintenance/nukeEntireWiki.php b/maintenance/nukeEntireWiki.php deleted file mode 100644 index 8f0f084fa9..0000000000 --- a/maintenance/nukeEntireWiki.php +++ /dev/null @@ -1,48 +0,0 @@ -mDescription = "Truncate all tables in your wiki. Skips user-related tables by default"; - $this->addOption( 'users', 'Include the user-related tables' ); - } - - public function getDbType() { - return Maintenance::DB_ADMIN; - } - - public function execute() { - $this->output( "This will truncate all tables in your MediaWiki installation. Press Ctrl+C to abort\n" ); - wfCountDown( 5 ); - - $dbw = wfGetDB( DB_MASTER ); - - // Skip these tables unless the --users switch was given - if( !$this->hasOption( 'users' ) ) { - $userTables = $dbw->tableNamesN( 'user', 'user_groups', 'user_properties' ); - } else { - $userTables = array(); - } - - $res = $dbw->query( "SHOW TABLES" ); - while( $tbl = $dbw->fetchRow( $res ) ) { - if( in_array( "`{$tbl[0]}`", $userTables ) ) - continue; - $this->output( "Truncating table {$tbl[0]}..." ); - $dbw->query( "TRUNCATE TABLE {$tbl[0]}" ); - $this->output( "done\n" ); - } - } -} - -$maintClass = 'NukeEntireWiki'; -require_once( DO_MAINTENANCE ); -- 2.20.1