remove accidentally left-in debugging output
[lhc/web/wiklou.git] / maintenance / compressOld.php
1 <?php
2
3 # Compress the old table, old_flags=gzip
4
5 require_once( "commandLine.inc" );
6 require_once( "compressOld.inc" );
7
8 if( !function_exists( "gzdeflate" ) ) {
9 print "You must enable zlib support in PHP to compress old revisions!\n";
10 print "Please see http://www.php.net/manual/en/ref.zlib.php\n\n";
11 die();
12 }
13
14 print "Depending on the size of your database this may take a while!\n";
15 print "If you abort the script while it's running it shouldn't harm anything,\n";
16 print "but if you haven't backed up your data, you SHOULD abort now!\n\n";
17 print "Press control-c to abort first (will proceed automatically in 5 seconds)\n";
18 sleep(5);
19
20 $n = 0;
21 if( !empty( $argv[1] ) ) {
22 $n = intval( $argv[1] );
23 }
24 compressOldPages( $n );
25
26 print "Done.\n";
27 exit();
28
29 ?>