summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/crash_reporter.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-22 15:54:24 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-22 15:54:24 +0545
commiteaa3fb69bbfa9163c8f67d69bc7b2360230a5044 (patch)
treee29806026df03327c8dc28c9db09613855153116 /src/usr/local/www/crash_reporter.php
parentc40fbe6d09c15c367fd900ff20e88b4dedb6bd4e (diff)
downloadpfsense-eaa3fb69bbfa9163c8f67d69bc7b2360230a5044.zip
pfsense-eaa3fb69bbfa9163c8f67d69bc7b2360230a5044.tar.gz
Cleanup crash_reporter Submit checks
When looking at this earlier I never paid attention to the left side of each of these conditions. It is pretty dumb to gettext($_POST['Submit']) and then compare it to gettext("Yes") !!! This cleans it up so it does just an ordinary comparison - works fine.
Diffstat (limited to 'src/usr/local/www/crash_reporter.php')
-rw-r--r--src/usr/local/www/crash_reporter.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php
index f4db694..6cd5adc 100644
--- a/src/usr/local/www/crash_reporter.php
+++ b/src/usr/local/www/crash_reporter.php
@@ -99,7 +99,7 @@ $crash_report_header .= "\nCrash report details:\n";
exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
?>
<?php
- if (gettext($_POST['Submit']) == gettext("Yes")) {
+ if ($_POST['Submit'] == "Yes") {
echo gettext("Processing...");
if (!is_dir("/var/crash")) {
mkdir("/var/crash", 0750, true);
@@ -126,7 +126,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
} else {
echo gettext("Could not find any crash files.");
}
- } else if (gettext($_POST['Submit']) == gettext("No")) {
+ } else if ($_POST['Submit'] == "No") {
array_map('unlink', glob("/var/crash/*"));
// Erase the contents of the PHP error log
fclose(fopen("/tmp/PHP_errors.log", 'w'));
OpenPOWER on IntegriCloud