summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_confbak.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-11-09 01:10:19 +0545
committerPhil Davis <phil.davis@inf.org>2015-11-09 01:10:19 +0545
commit0da0d43e3b0146ae9e563f3b69b0a5fd66135ebe (patch)
tree608d0d77075f7cea2138d325b078425c4e220540 /src/usr/local/www/diag_confbak.php
parentd6b8120d1b3962efd4089c880f018bb736ad1a2d (diff)
downloadpfsense-0da0d43e3b0146ae9e563f3b69b0a5fd66135ebe.zip
pfsense-0da0d43e3b0146ae9e563f3b69b0a5fd66135ebe.tar.gz
Diag review
Diffstat (limited to 'src/usr/local/www/diag_confbak.php')
-rw-r--r--src/usr/local/www/diag_confbak.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php
index b4cb75b..4fef59c 100644
--- a/src/usr/local/www/diag_confbak.php
+++ b/src/usr/local/www/diag_confbak.php
@@ -2,8 +2,8 @@
/* $Id$ */
/*
diag_confbak.php
-
- /* ====================================================================
+*/
+/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2005 Colin Smith
*
@@ -85,7 +85,7 @@ if (isset($_POST['backupcount'])) {
conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
-
+
if ($_GET['newver'] != "") {
if (config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) {
$savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['newver']), htmlspecialchars($confvers[$_GET['newver']]['description']));
@@ -171,13 +171,13 @@ if ($diff) {
<tr>
<td valign="middle" bgcolor="<?=$color; ?>" style="white-space: pre-wrap;"><?=htmlentities($line)?></td>
</tr>
-<?php
+<?php
}
?>
</table>
</div>
</div>
-<?php
+<?php
}
$tab_array = array();
@@ -216,13 +216,13 @@ if (is_array($confvers)) {
print_info_box(gettext('To view the differences between an older configuration and a newer configuration, ' .
'select the older configuration using the left column of radio options and select the newer configuration in the right column, ' .
'then press the "Diff" button.'));
-}
-?>
-
+}
+?>
+
<form action="diag_confbak.php" method="get">
<div class="table-resposive">
<table class="table table-striped table-hover table-condensed">
-<?php
+<?php
if (is_array($confvers)):
?>
<thead>
@@ -269,9 +269,9 @@ if (is_array($confvers)):
if ($c < (count($confvers) - 1)) {
?>
<input type="radio" name="newtime" value="<?=$version['time']?>" />
-<?php
+<?php
}
- $c++;
+ $c++;
?>
</td>
<td><?= $date ?></td>
@@ -280,18 +280,18 @@ if (is_array($confvers)):
<td><?= htmlspecialchars($version['description']) ?></td>
<td>
<a class="fa fa-undo" title="<?=gettext('Revert config')?>" href="diag_confbak.php?newver=<?=$version['time']?>" onclick="return confirm('<?=gettext("Are you sure you want to replace the current configuration with this backup?")?>')"></a>
- <a class="fa fa-download" title="<?=gettext('Download config')?>" href="diag_confbak.php?getcfg=<?=$version['time']?>"></a>
+ <a class="fa fa-download" title="<?=gettext('Download config')?>" href="diag_confbak.php?getcfg=<?=$version['time']?>"></a>
<a class="fa fa-trash" title="<?=gettext('Delete config')?>" href="diag_confbak.php?rmver=<?=$version['time']?>"></a>
</td>
</tr>
-<?php
+<?php
endforeach;
?>
<tr>
<td colspan="2"><input type="submit" name="diff" class="btn btn-info btn-xs" value="<?=gettext("Diff"); ?>" /></td>
<td colspan="5"></td>
</tr>
-<?php
+<?php
else:
print_info_box(gettext("No backups found."), 'danger');
endif;
OpenPOWER on IntegriCloud