crash reporter: improve previous

ALWAYS show the information to be sent!
This commit is contained in:
Franco Fichtner 2015-09-14 17:10:56 +02:00
parent 3ce337faed
commit ffa8a1c4e4

View File

@ -77,6 +77,10 @@ $crash_report_header = sprintf(
shell_exec('/sbin/sysctl -b kern.hostuuid')
);
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$crash_report_header .= "User Agent {$_SERVER['HTTP_USER_AGENT']}\n";
}
$pkgver = explode('-', trim(file_get_contents('/usr/local/opnsense/version/opnsense')));
$user_agent = $g['product_name'] . '/' . $pkgver[0];
$crash_reports = array();
@ -91,10 +95,6 @@ if (isset($_POST['Submit'])) {
if (!empty($email)) {
$crash_report_header .= "Email {$email}\n";
}
if (isset($_SERVER["HTTP_USER_AGENT"]))
{
$crash_report_header .= "User Agent " . $_SERVER["HTTP_USER_AGENT"] . "\n";
}
$desc = trim($_POST['Desc']);
if (!empty($desc)) {
$crash_report_header .= "Description\n\n{$desc}";