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 if (daemonCheck()) { foreach ($monitors_to_restart as $monitor) { if ($monitor->Type() != 'WebSite') { $monitor->zmcControl('restart'); } } } $refreshParent = true; if (!$error_message) $redirect = '?view=zones'.(isset($_REQUEST['mids']) ? '&'.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 ?>