NOBUG: Added note to avoid forgetting it

This commit is contained in:
Eloy Lafuente 2010-11-01 15:52:18 +00:00
parent a03867380d
commit fe575d8215
2 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,8 @@ class backup_controller extends backup implements loggable {
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
if ($status == backup::STATUS_AWAITING) {
$this->save_controller();
$this->logger = self::load_controller($this->backupid)->logger; // wakeup loggers

View File

@ -153,6 +153,8 @@ class restore_controller extends backup implements loggable {
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING | STATUS_NEED_PRECHECK, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
if ($status == backup::STATUS_AWAITING || $status == backup::STATUS_NEED_PRECHECK) {
$this->save_controller();
$this->logger = self::load_controller($this->restoreid)->logger; // wakeup loggers