Gzip Support : bug fixe

This commit is contained in:
Armel Fauveau
2001-07-07 20:50:01 +00:00
parent 29ec39751e
commit e5b9d6a015

View File

@@ -1,10 +1,8 @@
<?php <?php
/* $Id$ */ /* $Id$ */
require("./grab_globals.inc.php3"); require("./grab_globals.inc.php3");
@set_time_limit(600); @set_time_limit(600);
$crlf="\n"; $crlf="\n";
@@ -122,9 +120,7 @@ else
$dump_buffer.= "$crlf#$crlf"; $dump_buffer.= "$crlf#$crlf";
$dump_buffer.= "# $strTableStructure '$table'$crlf"; $dump_buffer.= "# $strTableStructure '$table'$crlf";
$dump_buffer.= "#$crlf$crlf"; $dump_buffer.= "#$crlf$crlf";
$dump_buffer.= get_table_def($db,$table, $crlf).";$crlf";
get_table_def($db, $table, $crlf).";$crlf";
$dump_buffer.=$tmp_buffer;
} }
if(($what == "data") || ($what == "dataonly")) if(($what == "data") || ($what == "dataonly"))
@@ -133,17 +129,19 @@ else
$dump_buffer.= "# $strDumpingData '$table'$crlf"; $dump_buffer.= "# $strDumpingData '$table'$crlf";
$dump_buffer.= "#$crlf$crlf"; $dump_buffer.= "#$crlf$crlf";
$tmp_buffer="";
get_table_content($db, $table, "my_handler"); get_table_content($db, $table, "my_handler");
$dump_buffer.=$tmp_buffer; $dump_buffer.=$tmp_buffer;
} }
$i++; $i++;
} }
} }
$dump_buffer.= "$crlf"; // Don't remove, it makes easier to select & copy from browser - staybyte // Don't remove, it makes easier to select & copy frombrowser - staybyte
$dump_buffer.= "$crlf";
} }
else else
{ // $what != "csv" { // $what != "csv"
$tmp_buffer="";
get_table_csv($db, $table, $separator, "my_csvhandler"); get_table_csv($db, $table, $separator, "my_csvhandler");
$dump_buffer.=$tmp_buffer; $dump_buffer.=$tmp_buffer;
} }
@@ -151,7 +149,8 @@ else
if(isset($gzip)) { if(isset($gzip)) {
if($gzip == "gzip" && function_exists("gzencode")) if($gzip == "gzip" && function_exists("gzencode"))
echo gzencode($dump_buffer); // without the optional parameter level because it bug // without the optional parameter level because it bug
echo gzencode($dump_buffer);
} }
else else
echo $dump_buffer; echo $dump_buffer;