Skip to content

Commit

Permalink
bug phpmyadmin#3840 When exporting to gzip format, the data is compre…
Browse files Browse the repository at this point in the history
…ssed 2 times
  • Loading branch information
Gemorroj committed Mar 18, 2013
1 parent 81b94eb commit 30b4fda
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -97,6 +97,7 @@ underscore
- bug #3829 Enabling query profiling crashes javascript based navigation
+ rfe #879 Reserved word warning
+ Remove the database ordering sub-feature of the only_db directive
bug #3840 When exporting to gzip format, the data is compressed 2 times

3.5.8.0 (not yet released)
- bug #3828 MariaDB reported as MySQL
Expand Down
16 changes: 16 additions & 0 deletions export.php
Expand Up @@ -137,6 +137,20 @@
// We send fake headers to avoid browser timeout when buffering
$time_start = time();


/**
* Disable all handlers
*
* @return bool
*/
function PMA_handlersDisable()
{
while (ob_get_level() > 0) {
ob_end_clean();
}
return true;
}

/**
* Detect whether gzencode is needed; it might not be needed if
* the server is already compressing by itself
Expand All @@ -158,6 +172,7 @@ function PMA_gzencodeNeeded()
return false;
}
}

/**
* Output handler for all exports, if needed buffering, it stores data into
* $dump_buffer, otherwise it prints thems out.
Expand Down Expand Up @@ -823,6 +838,7 @@ function PMA_exportOutputHandler($line)
}
exit();
} else {
PMA_handlersDisable();
PMA_Response::getInstance()->disable();
echo $dump_buffer;
}
Expand Down

0 comments on commit 30b4fda

Please sign in to comment.