Hi Andrew.
Thanks for the details.
The alert logic (for 2-step) uses the static WorkflowTwoStepRequest::$default_alerts as the defaults for what is loaded into a static variable WorkflowRequest::alerts. set_alert overrides values in this static. There are a couple of avenues to pursue:
* determine if set_alert is having the effect you think it should be having, by calling print_r(WorkflowRequest::alerts) before and after calling set_alert.
* rather than call set_alert, assign WorkflowTwoStepRequest::$default_alerts in mysite config. It's not pretty, but you could try something like this:
if (class_exists('WorkflowTwoStepRequest')) {
WorkflowTwoStepRequest::$default_alerts = array(
'WorkflowPublicationRequest' => array(
'request' => array(
'author' => true,
'publisher' => true
),
'approve' => array(
'author' => true,
'publisher' => true
),
'deny' => array(
'author' => true,
'publisher' => true
),
'cancel' => array(
'author' => true,
'publisher' => true
),
'comment' => array(
'author' => true,
'publisher' => true
),
'requestedit' => array(
'author' => true,
'publisher' => true,
'approver' => true
)
),
'WorkflowDeletionRequest' => array(
'request' => array(
'author' => false,
'publisher' => false
),
'approve' => array(
'author' => true,
'publisher' => true
),
'deny' => array(
'author' => true,
'publisher' => true
),
'cancel' => array(
'author' => true,
'publisher' => true
),
'comment' => array(
'author' => false,
'publisher' => false
)
)
);
}
in mysite/_config.php, with the settings you want, and see if that gives you the behaviour you're after. Is it only admin you gets the unwanted email? If you have a non-admin with publishing priveleges, do you get the same behaviour?
Mark