Message shows failure of error report submission
This commit is contained in:
parent
677e4496b7
commit
f82e321b75
@ -13,28 +13,66 @@ $response = PMA_Response::getInstance();
|
||||
if (isset($_REQUEST['send_error_report'])
|
||||
&& $_REQUEST['send_error_report'] == true
|
||||
) {
|
||||
PMA_sendErrorReport(PMA_getReportData(false));
|
||||
$server_response = PMA_sendErrorReport(PMA_getReportData(false));
|
||||
$success = $server_response === false ? false : json_decode($server_response, true)["success"];
|
||||
if ($_REQUEST['automatic'] === "true") {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::error(
|
||||
__(
|
||||
'An error has been detected and an error report has been '
|
||||
.'automatically submitted based on your settings.'
|
||||
if ($success) {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::error(
|
||||
__(
|
||||
'An error has been detected and an error report has been '
|
||||
.'automatically submitted based on your settings.'
|
||||
)
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::error(
|
||||
__(
|
||||
'An error has been detected and an error report has been '
|
||||
.'generated but failed to be sent.'
|
||||
)
|
||||
. ' '
|
||||
. __(
|
||||
'If you experience any '
|
||||
.'problems please submit a bug report manually'
|
||||
)
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::success(
|
||||
__('Thank you for submitting this report.')
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
);
|
||||
if ($success) {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::success(
|
||||
__('Thank you for submitting this report.')
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
PMA_Message::error(
|
||||
__('Thank you for submitting this report.')
|
||||
. ' '
|
||||
. __('Unfortunately the submission failed.')
|
||||
. ' '
|
||||
. __(
|
||||
'If you experience any '
|
||||
.'problems please submit a bug report manually'
|
||||
)
|
||||
. '<br />'
|
||||
. __('You may want to refresh the page.')
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($_REQUEST['always_send'] === "true") {
|
||||
PMA_persistOption("SendErrorReports", "always", "ask");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user