system: fix previous, access before define

This commit is contained in:
Franco Fichtner 2018-09-10 19:09:08 +02:00
parent cab8b1cf41
commit 3972bedbdf

View File

@ -38,6 +38,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['backupcount'] = 60;
}
$cnf = OPNsense\Core\Config::getInstance();
$confvers = $cnf->getBackups(true);
if (!empty($_GET['getcfg'])) {
foreach ($confvers as $filename => $revision) {
if ($revision['time'] == $_GET['getcfg']) {
@ -54,8 +57,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
$cnf = OPNsense\Core\Config::getInstance();
$confvers = $cnf->getBackups(true);
$oldfile = '';
$newfile = '';
$diff = '';