changes($_REQUEST['Report']); if (count($changes)) { if (!$report->save($changes)) { $error_message .= "Error saving report: " . $report->get_last_error().'
'; } else { $redirect = '?view=report&id='.$report->Id(); } } } else if ($action == 'delete') { $report->delete(); $redirect = '?view=reports'; } else { ZM\Error("Unknown action $action in saving Report"); } ?>