Merge pull request #1986 from phptek/bug/099

BUGFIX: Pages set as 'deletedindraft' were allowed to be published throu...
This commit is contained in:
Ingo Schommer 2013-05-24 15:49:15 -07:00
commit afd93547fd

View File

@ -82,9 +82,13 @@ abstract class CMSBatchAction extends Object {
foreach($objs as $obj) {
// Perform the action
if (!call_user_func_array(array($obj, $helperMethod), $arguments)) {
$status['error'][$obj->ID] = '';
// Don't run doPublish() if $obj isn't in a fit state be published
// @todo Implementation logic _is_ better in CMSBatchAction_Publish#run() but at least objects not matching, still get the batchaction run over them
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