Skip to content

Commit

Permalink
bug #4606 Tracking report export as SQL dump does not work
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Nov 25, 2014
1 parent 8607de6 commit 14a7726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog
- bug #4604 Query history not being deleted
- bug #4057 db/table query string parameters no longer work
- bug #4605 Unseen messages in tracking
- bug #4606 Tracking report export as SQL dump does not work

4.2.12.0 (2014-11-20)
- bug #4574 Blank/white page when JavaScript disabled
Expand Down
4 changes: 3 additions & 1 deletion libraries/tbl_common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
if (PMA_Tracker::isActive()
&& PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"])
&& ! isset($_REQUEST['submit_deactivate_now'])
&& ! (isset($_REQUEST['report_export'])
&& $_REQUEST['export_type'] == 'sqldumpfile')
) {
$temp_msg = '<a href="tbl_tracking.php?' . $url_query . '">';
$temp_msg .= sprintf(
Expand All @@ -57,7 +59,7 @@
$temp_msg .= '</a>';

$msg = PMA_Message::notice($temp_msg);
$msg->display();
PMA_Response::getInstance()->addHTML($msg->getDisplay());
}

?>
6 changes: 3 additions & 3 deletions libraries/tbl_tracking.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1115,10 +1115,10 @@ function PMA_exportAsFileDownload($entries)
$dump .= $entry['statement'];
}
$filename = 'log_' . htmlspecialchars($_REQUEST['table']) . '.sql';
PMA_downloadHeader($filename, 'text/x-sql', strlen($dump));

$response = PMA_Response::getInstance();
$response->addHTML($dump);
PMA_Response::getInstance()->disable();
PMA_downloadHeader($filename, 'text/x-sql', strlen($dump));
echo $dump;

exit();
}
Expand Down

0 comments on commit 14a7726

Please sign in to comment.