MINOR don't call TreeTitle on a node if it's being removed.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@83452 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2009-08-02 21:57:26 +00:00
parent 037e73a8cb
commit 07a61a19a5

View File

@ -45,8 +45,10 @@ abstract class CMSBatchAction extends Object {
// Now make sure the tree title is appropriately updated
$publishedRecord = DataObject::get_by_id('SiteTree', $page->ID);
if ($publishedRecord) {
$JS_title = Convert::raw2js($publishedRecord->TreeTitle());
FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title');");
}
$page->destroy();
unset($page);
}