Id()) { $error_message .= 'Zone not found for id ' . $markZid.'
'; continue; } $monitor = $zone->Monitor(); if (!$monitor->canEdit()) { $error_message .= 'You do not have permission to edit zones for monitor ' . $monitor->Name().'.
'; continue; } # Could use true but store the object instead for easy access later $monitors_to_restart[] = $monitor; $error_message .= $zone->delete(); } # end foreach Zone foreach ( $monitors_to_restart as $monitor ) { if ( daemonCheck() and ($monitor->Type() != 'WebSite') ) { $monitor->zmcControl('restart'); } // end if daemonCheck() } $refreshParent = true; if (!$error_message) $redirect = '?view=zones&'.implode('&', array_map(function($mid){ return 'mids[]='.$mid; }, $_REQUEST['mids'])); } else { $error_message .= 'No Zones marked for deletion.
'; } // end if isset($_REQUEST['markZids']) } // end if action ?>