summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_reboot.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-04-04 17:59:42 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-04-04 18:25:46 -0400
commitdc99feef4efd4fe6433a1072a28b193f7f368d6d (patch)
treefd9b4b3632f8edc65d2af09f6de9d53c5998c5bf /src/usr/local/www/diag_reboot.php
parent017ca0c0c3d09f8181f65fcdef787619e24963c0 (diff)
downloadpfsense-dc99feef4efd4fe6433a1072a28b193f7f368d6d.zip
pfsense-dc99feef4efd4fe6433a1072a28b193f7f368d6d.tar.gz
Fixed #6068
(cherry picked from commit 669343a2d37534fec4a41c3b2c6c8cd1bf4e1170)
Diffstat (limited to 'src/usr/local/www/diag_reboot.php')
-rwxr-xr-xsrc/usr/local/www/diag_reboot.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/usr/local/www/diag_reboot.php b/src/usr/local/www/diag_reboot.php
index ffe29cb..de9ef97 100755
--- a/src/usr/local/www/diag_reboot.php
+++ b/src/usr/local/www/diag_reboot.php
@@ -77,7 +77,7 @@ $pgtitle = array(gettext("Diagnostics"), gettext("Reboot"));
include("head.inc");
-if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+if (($_SERVER['REQUEST_METHOD'] == 'POST') && ($_POST['override'] != "yes")) {
if (DEBUG) {
print_info_box(gettext("Not actually rebooting (DEBUG is set true)."), 'success');
} else {
@@ -156,6 +156,16 @@ events.push(function() {
</div>
</div>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ //If we have been called with $_POST['override'] == "yes", then just reload the page to simulate the user clicking "Reboot"
+ if ( "<?=$_POST['override']?>" == "yes") {
+ $('form').submit();
+ }
+});
+//]]>
+</script>
<?php
}
OpenPOWER on IntegriCloud