diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index fd3317a15..35b9d383f 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -93,6 +93,14 @@ if (isset($_POST['Submit'])) { $email = trim($_POST['Email']); if (!empty($email)) { $crash_report_header .= "Email {$email}\n"; + if (!isset($config['system']['contact_email']) || + $config['system']['contact_email'] !== $email) { + $config['system']['contact_email'] = $email; + write_config('Updated crash reporter contact email.'); + } + } elseif (isset($config['system']['contact_email'])) { + unset($config['system']['contact_email']); + write_config('Removed crash reporter contact email.'); } $desc = trim($_POST['Desc']); if (!empty($desc)) { @@ -117,6 +125,8 @@ if (isset($_POST['Submit'])) { $has_crashed = get_crash_report(true) != ''; } +$email = isset($config['system']['contact_email']) ? $config['system']['contact_email'] : ''; + if ($has_crashed) { $crash_files = glob("/var/crash/*"); $crash_reports['System Information'] = trim($crash_report_header); @@ -158,7 +168,7 @@ if ($has_crashed) { echo "
" . gettext("Would you like to submit this crash report to the developers?") . "
"; echo '' . gettext('You can help us further by adding your contact information and a problem description. ' . 'Please note that providing your contact information greatly improves the chances of bugs being fixed.') . '
'; - echo sprintf('', gettext('your@email.com')); + echo sprintf('', gettext('your@email.com'), $email); echo sprintf('', gettext('A short problem description or steps to reproduce.')); echo "" . gettext("Please double-check the following contents to ensure you are comfortable submitting the following information.") . "
"; foreach ($crash_reports as $report => $content) {