small fixes to backup config

This commit is contained in:
Ad Schellevis 2015-03-15 19:21:16 +01:00
parent 511eb60e55
commit 31f4f5df60

View File

@ -364,7 +364,7 @@ class Config extends Singleton
public function restoreBackup($filename)
{
if ($this->statusIsValid) {
if ($this->isValid()) {
// if current config is valid,
$simplexml = $this->simplexml;
try {
@ -377,6 +377,7 @@ class Config extends Singleton
$this->simplexml = $simplexml;
$this->statusIsValid = true;
$this->save(null, true);
return false;
}
} else {
// we don't have a valid config loaded, just copy and load the requested one