Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
7a39df6f
Commit
7a39df6f
authored
Dec 09, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) regression diag_confbak.php
parent
f10e469b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
diag_confbak.php
src/www/diag_confbak.php
+3
-3
No files found.
src/www/diag_confbak.php
View file @
7a39df6f
...
...
@@ -81,17 +81,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
elseif
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'POST'
)
{
$cnf
=
OPNsense\Core\Config
::
getInstance
();
$confvers
=
$cnf
->
getBackups
(
true
);
if
(
!
empty
(
$_POST
[
'
backupcount
'
]))
{
if
(
!
empty
(
$_POST
[
'
save
'
]))
{
if
(
is_numeric
(
$_POST
[
'backupcount'
])
&&
(
$_POST
[
'backupcount'
]
>=
0
))
{
$config
[
'system'
][
'backupcount'
]
=
$_POST
[
'backupcount'
];
}
else
{
}
else
if
(
isset
(
$config
[
'system'
][
'backupcount'
]))
{
unset
(
$config
[
'system'
][
'backupcount'
]);
}
write_config
(
gettext
(
'Changed backup revision count.'
));
}
elseif
(
!
empty
(
$_POST
[
'act'
])
&&
$_POST
[
'act'
]
==
"revert"
)
{
foreach
(
$confvers
as
$filename
=>
$revision
)
{
if
(
isset
(
$revision
[
'time'
])
&&
$revision
[
'time'
]
==
$_POST
[
'time'
])
{
if
(
config_restore
(
$filename
)
==
0
)
{
if
(
config_restore
(
$filename
)
==
0
)
{
$savemsg
=
sprintf
(
gettext
(
'Successfully reverted to timestamp %s with description "%s".'
),
date
(
gettext
(
"n/j/y H:i:s"
),
$_POST
[
'id'
]),
$revision
[
'description'
]);
}
else
{
$savemsg
=
gettext
(
"Unable to revert to the selected configuration."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment