mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 20:59:23 +02:00
BUGFIX: Pages set as 'deletedindraft' were allowed to be published through CMS batch-actions leaving an empty title in the SiteTree.
This commit is contained in:
parent
916de30204
commit
9741d1f63b
@ -82,9 +82,13 @@ abstract class CMSBatchAction extends Object {
|
|||||||
|
|
||||||
foreach($objs as $obj) {
|
foreach($objs as $obj) {
|
||||||
|
|
||||||
// Perform the action
|
// Don't run doPublish() if $obj isn't in a fit state be published
|
||||||
if (!call_user_func_array(array($obj, $helperMethod), $arguments)) {
|
// @todo Implementation logic _is_ better in CMSBatchAction_Publish#run() but at least objects not matching, still get the batchaction run over them
|
||||||
$status['error'][$obj->ID] = '';
|
if ($helperMethod == 'isPublish' && !$obj->getIsDeletedFromStage()) {
|
||||||
|
// Perform the action
|
||||||
|
if (!call_user_func_array(array($obj, $helperMethod), $arguments)) {
|
||||||
|
$status['error'][$obj->ID] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now make sure the tree title is appropriately updated
|
// Now make sure the tree title is appropriately updated
|
||||||
|
Loading…
Reference in New Issue
Block a user