00001 <?php 00002 00003 # Compress the old table, old_flags=gzip 00004 00005 require_once( "commandLine.inc" ); 00006 require_once( "compressOld.inc" ); 00007 00008 if( !function_exists( "gzdeflate" ) ) { 00009 print "You must enable zlib support in PHP to compress old revisions!\n"; 00010 print "Please see http://www.php.net/manual/en/ref.zlib.php\n\n"; 00011 die(); 00012 } 00013 00014 print "Depending on the size of your database this may take a while!\n"; 00015 print "If you abort the script while it's running it shouldn't harm anything,\n"; 00016 print "but if you haven't backed up your data, you SHOULD abort now!\n\n"; 00017 print "Press control-c to abort first (will proceed automatically in 5 seconds)\n"; 00018 sleep(5); 00019 00020 $n = 0; 00021 if( !empty( $argv[1] ) ) { 00022 $n = intval( $argv[1] ); 00023 } 00024 compressOldPages( $n ); 00025 00026 print "Done.\n"; 00027 exit(); 00028 00029 ?>