summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/crash_reporter.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-22 11:39:50 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-22 11:39:50 +0545
commit257fc849830aedf52338e84e489ad20e02f14179 (patch)
tree8cac8f5127fa52c76404a1e69c926755bef177db /src/usr/local/www/crash_reporter.php
parent7c36b00f1d15f0496983e6e3f528b963111cc505 (diff)
downloadpfsense-257fc849830aedf52338e84e489ad20e02f14179.zip
pfsense-257fc849830aedf52338e84e489ad20e02f14179.tar.gz
Crash Reporter compare choice with language-specific string #5792
I don't really understand why this has to be - the HTML has value="Yes" and value="No" - I thought those would be the strings sent along with "submit". The translation of Yes and No should have been just for display purposes. But after this change, I can submit or delete crash reports when the UI isin other languages.
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 de3cb58..f4db694 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']) == "Yes") {
+ if (gettext($_POST['Submit']) == gettext("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']) == "No") {
+ } else if (gettext($_POST['Submit']) == gettext("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