aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/compressOld.php
blob: 0d3531376efad50ffdc04ec7ada6713eedb08bca (plain) (blame)
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
<?php

# Compress the old table, old_flags=gzip

require_once( "commandLine.inc" );
require_once( "compressOld.inc" );

if( !function_exists( "gzdeflate" ) ) {
	print "You must enable zlib support in PHP to compress old revisions!\n";
	print "Please see http://www.php.net/manual/en/ref.zlib.php\n\n";
	die();
}

print "Depending on the size of your database this may take a while!\n";
print "If you abort the script while it's running it shouldn't harm anything,\n";
print "but if you haven't backed up your data, you SHOULD abort now!\n\n";
print "Press control-c to abort first (will proceed automatically in 5 seconds)\n";
sleep(5);

$n = 0;
if( !empty( $argv[1] ) ) {
	$n = intval( $argv[1] );
}
compressOldPages( $n );

print "Done.\n";
exit();

?>