API CHANGE Moved SiteTree->doRollbackTo() to Versioned class

This commit is contained in:
Ingo Schommer 2011-03-23 16:02:10 +13:00
parent 502131171b
commit 3f3f0f6211

View File

@ -875,6 +875,17 @@ class Versioned extends DataObjectDecorator {
Versioned::set_reading_mode($oldMode);
return $result;
}
/**
* Roll the draft version of this page to match the published page.
* Caution: Doesn't overwrite the object properties with the rolled back version.
*
* @param $version Either the string 'Live' or a version number
*/
function doRollbackTo($version) {
$this->publish($version, "Stage", true);
$this->owner->writeWithoutVersion();
}
/**
* Build a SQL query to get data from the _version table.