<?
// check if the forum can be deleted
// the flag that allows or disallows deleting a forum
$bCanDelete = true;
// obtain data on all handlers of "OnBeforeForumDelete" event
// that belongs to the Forum module
$rsEvents = GetModuleEvents("forum", "OnBeforeForumDelete");
while ($arEvent = $rsEvents->Fetch())
{
// run the scheduled handler of "OnBeforeForumDelete"
// if false is returned...
if (ExecuteModuleEvent($arEvent, $del_id)===false)
{
// cannot delete forum
$bCanDelete = false;
break;
}
}
?>