Merge pull request #1730 from wilr/open5489

API: add onBeforeRollback() and onAfterRollback() hooks.
This commit is contained in:
Ingo Schommer 2013-04-06 03:08:02 -07:00
commit ff2977eee3

View File

@ -1077,8 +1077,12 @@ class Versioned extends DataExtension {
* @param $version Either the string 'Live' or a version number
*/
public function doRollbackTo($version) {
$this->extend('onBeforeRollback', $version);
$this->publish($version, "Stage", true);
$this->owner->writeWithoutVersion();
$this->extend('onAfterRollback', $version);
}
/**