diff --git a/src/www/diag_confbak.php b/src/www/diag_confbak.php index 4bb172f4c..8e17f67a2 100644 --- a/src/www/diag_confbak.php +++ b/src/www/diag_confbak.php @@ -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 = '';