Skip to content

Commit

Permalink
MDL-24419 (1): Core restore steps should have after_restore function
Browse files Browse the repository at this point in the history
At present core restore steps cannot have an after_restore function,
even though plugin restore steps can. Technically it would be possible
to just override the launch_after_restore_methods function but this
is not very neat. Instead, I added code to call after_restore function
(exactly the same way after_execute works).
  • Loading branch information
sammarshallou committed May 14, 2012
1 parent 71d7bc3 commit 1cf121e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backup/util/plan/restore_structure_step.class.php
Expand Up @@ -395,6 +395,8 @@ public function launch_after_restore_methods() {
$pobject->launch_after_restore_methods();
}
}
// Finally execute own (restore_structure_step) after_restore method
$this->after_restore();
}

/**
Expand All @@ -408,6 +410,16 @@ protected function after_execute() {
// do nothing by default
}

/**
* This method will be executed after the rest of the restore has been processed.
*
* Use if you need to update IDs based on things which are restored after this
* step has completed.
*/
protected function after_restore() {
// do nothing by default
}

/**
* Prepare the pathelements for processing, looking for duplicates, applying
* processing objects and other adjustments
Expand Down

0 comments on commit 1cf121e

Please sign in to comment.