2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Handle error report submission
8 require_once 'libraries/common.inc.php';
9 require_once 'libraries/error_report.lib.php';
11 $response = PMA_Response
::getInstance();
13 if ($_REQUEST['send_error_report'] == true) {
14 PMA_sendErrorReport(PMA_getReportData(false));
15 if ($_REQUEST['automatic'] === "true") {
20 'An error has been detected and an error report has been '
21 .'automatically submitted based on your settings.'
24 . __('You may want to refresh the page.')
31 __('Thank you for submitting this report.')
33 . __('You may want to refresh the page.')
36 if ($_REQUEST['always_send'] === "true") {
37 PMA_persistOption("SendErrorReports", "always", "ask");
40 } elseif ($_REQUEST['get_settings']) {
41 $response->addJSON('report_setting', $GLOBALS['cfg']['SendErrorReports']);
43 $response->addHTML(PMA_getErrorReportForm());