Function(); $oldEnabled = $monitor->Enabled(); if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled ) { $monitor->save(array('Function'=>$newFunction, 'Enabled'=>$newEnabled)); if ( daemonCheck() && ($monitor->Type() != 'WebSite') ) { zmaControl($monitor, 'stop'); zmcControl($monitor, ($newFunction != 'None') ? 'restart' : 'stop'); if ( $newFunction != 'None' && $newFunction != 'NoDect' ) zmaControl($monitor, 'start'); } } else { ZM\Logger::Debug('No change to function, not doing anything.'); } } // end if action $view = 'console'; ?>