diff options
author | Phil Davis <phil.davis@inf.org> | 2015-08-31 22:23:15 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-08-31 22:23:15 +0545 |
commit | 288a2a0f294f992a9536dfbb5c54dd528badbad5 (patch) | |
tree | 8d1c6be8a2cf5848f6df06b631ce2614485648fe /src/usr/local/www/crash_reporter.php | |
parent | 683ba309d50913828decb5fe3f6ade059c1dfab2 (diff) | |
download | pfsense-288a2a0f294f992a9536dfbb5c54dd528badbad5.zip pfsense-288a2a0f294f992a9536dfbb5c54dd528badbad5.tar.gz |
bootstrap usr/local/www a to e minor edits
Diffstat (limited to 'src/usr/local/www/crash_reporter.php')
-rw-r--r-- | src/usr/local/www/crash_reporter.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php index dc0a7c9..50e105f 100644 --- a/src/usr/local/www/crash_reporter.php +++ b/src/usr/local/www/crash_reporter.php @@ -75,7 +75,7 @@ function upload_crash_report($files) { global $g; $post = array(); $counter = 0; - foreach($files as $file) { + foreach ($files as $file) { $post["file{$counter}"] = "@{$file}"; $counter++; } @@ -91,7 +91,7 @@ function upload_crash_report($files) { return $response; } -$pgtitle = array(gettext("Diagnostics"),gettext("Crash reporter")); +$pgtitle = array(gettext("Diagnostics"), gettext("Crash reporter")); include('head.inc'); $crash_report_header = "Crash report begins. Anonymous machine information:\n\n"; @@ -119,7 +119,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); echo gettext("Uploading..."); ob_flush(); flush(); - if(is_array($files_to_upload)) { + if (is_array($files_to_upload)) { $resp = upload_crash_report($files_to_upload); array_map('unlink', glob("/var/crash/*")); // Erase the contents of the PHP error log @@ -130,7 +130,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); } else { echo "Could not find any crash files."; } - } else if(gettext($_POST['Submit']) == "No") { + } else if (gettext($_POST['Submit']) == "No") { array_map('unlink', glob("/var/crash/*")); // Erase the contents of the PHP error log fclose(fopen("/tmp/PHP_errors.log", 'w')); @@ -143,9 +143,9 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); $crash_reports .= "\nPHP Errors:\n"; $crash_reports .= implode("\n", $php_errors) . "\n\n"; } - if(is_array($crash_files)) { - foreach($crash_files as $cf) { - if(filesize($cf) < FILE_SIZE) { + if (is_array($crash_files)) { + foreach ($crash_files as $cf) { + if (filesize($cf) < FILE_SIZE) { $crash_reports .= "\nFilename: {$cf}\n"; $crash_reports .= file_get_contents($cf); } |