You could do a
$messages=drupal_get_messages('status',true); //grab current messages,
clearing out the queue
//delete code goes here.
drupal_get_messages('status',true); //just to clear out messages set by
clearing out the queue
foreach ($messages['status'] as $message){
drupal_set_message('status',$message); // reset the original messages
}
Jamie Holly
http://www.intoxination.net
http://www.hollyit.net
On 12/21/2009 11:50 AM, Lluís wrote:
I have a node-type with lot of sub-nodes. When a node is deleted all
of its sub-nodes are also deleted; but I don't want the user to
receive 50 or so "node XXX has benn deleted"; I want the user to see
just one message.
Is there a way to do this?
something like:
<?php
drupal_disable_messages();
while () {
node_delete($i);
}
drupal_enable_messages();
?>
thanks