MINOR added better status reporting to batch actions. Will now report the correct number of pages actioned in the status message (from r88786)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89185 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 22:24:41 +00:00
parent 5082cd8ffb
commit 500ce4a91d

View File

@ -1804,6 +1804,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @uses SiteTreeDecorator->onAfterPublish()
*/
function doPublish() {
if (!$this->canPublish()) return false;
$original = Versioned::get_one_by_stage("SiteTree", "Live", "\"SiteTree\".\"ID\" = $this->ID");
if(!$original) $original = new SiteTree();
@ -1875,6 +1877,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @uses SiteTreeDecorator->onAfterUnpublish()
*/
function doUnpublish() {
if (!$this->canPublish()) return false;
$this->extend('onBeforeUnpublish');
// Call delete on a cloned object so that this one doesn't lose its ID