Skip to content

Commit

Permalink
NOBUG: Added note to avoid forgetting it
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Nov 1, 2010
1 parent a038673 commit fe575d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backup/controller/backup_controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public function set_status($status) {
// 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
Expand Down
2 changes: 2 additions & 0 deletions backup/controller/restore_controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public function set_status($status) {
// 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
Expand Down

0 comments on commit fe575d8

Please sign in to comment.