+
+
" . gettext("Unfortunately we have detected at least one programming bug.") . "
";
+ echo "
" . gettext("Would you like to submit this crash report to the developers?") . "
";
+ echo "
";
+ echo "
";
+ echo "
" . gettext("You can help us further by optionally adding your contact information and a problem description.") . "
";
+ echo "
";
+ echo "
";
+ echo "
" . gettext("Please double-check the following contents to ensure you are comfortable submitting the following information.") . "
";
+ foreach ($crash_reports as $report => $content) {
+ echo "
{$report}:
{$content}";
+ }
+} else {
+ $message = gettext('Luckily we have not detected a programming bug.');
+ if (isset($_POST['Submit'])) {
+ if ($_POST['Submit'] == 'yes') {
+ $message = gettext('Thank you for submitting this crash report.');
+ } elseif ($_POST['Submit'] == 'no') {
+ $message = gettext('Please consider submitting a crash report if the error persists.');
+ }
}
- if (get_crash_report(true) != '' || (isset($_POST['Submit']) && $_POST['Submit'] == 'new')) {
- $crash_files = glob("/var/crash/*");
- $crash_reports['System Information'] = trim($crash_report_header);
- $php_errors = @file_get_contents('/tmp/PHP_errors.log');
- if (!empty($php_errors)) {
- $crash_reports['PHP Errors'] = trim($php_errors);
- }
- $dmesg_boot = @file_get_contents('/var/run/dmesg.boot');
- if (!empty($dmesg_boot)) {
- $crash_reports['dmesg.boot'] = trim($dmesg_boot);
- }
- foreach ($crash_files as $cf) {
- if (!is_link($cf) && $cf != '/var/crash/minfree' && $cf != '/var/crash/bounds' && filesize($cf) < FILE_SIZE) {
- $crash_reports[$cf] = trim(file_get_contents($cf));
- }
- }
- echo "
" . gettext("Unfortunately we have detected at least one programming bug.") . "
";
- echo "
" . gettext("Would you like to submit this crash report to the developers?") . "
";
- echo "
";
- echo "
";
- echo "
" . gettext("You can help us further by optionally adding your contact information and a problem description.") . "
";
- echo "
";
- echo "
";
- echo "
" . gettext("Please double-check the following contents to ensure you are comfortable submitting the following information.") . "
";
- foreach ($crash_reports as $report => $content) {
- echo "
{$report}:
{$content}";
- }
- } else {
- if (isset($_POST['Submit']) && $_POST['Submit'] == 'yes') {
- echo '
';
- echo gettext('Thank you for submitting this crash report.');
- echo '
';
- } elseif ($_POST['Submit'] == 'no') {
- echo '
';
- echo gettext('Please consider submitting a crash report if the error persists.');
- echo '
';
- } else {
- echo '
';
- echo '
' . gettext('Luckily we have not detected a programming bug.') . '
';
- }
- }
+ echo '
';
+ echo '
' . $message . '
';
+}
+
?>
-
-