if (GET && ACTION == 'publish') { $_POST = $zData; if ($zData['active_diseases_']) { $_POST['active_diseases'] = explode(';', $zData['active_diseases_']); } else { // An array with an empty string as a value doesn't get past the checkFields() since '' is not a valid option. $_POST['active_diseases'] = array(); } $_POST['statusid'] = STATUS_OK; } if (POST || ACTION == 'publish') { lovd_errorClean(); $_DATA->checkFields($_POST); if (!lovd_error()) { // Fields to be used. $aFields = array_merge(array('panelid', 'panel_size'), !$bSubmit || !empty($zData['edited_by']) ? array('edited_by', 'edited_date') : array(), $_DATA->buildFields()); // Prepare values. if ($_AUTH['level'] >= LEVEL_CURATOR) { $aFields[] = 'owned_by'; $aFields[] = 'statusid'; } elseif ($zData['statusid'] > STATUS_MARKED) { $aFields[] = 'statusid'; $_POST['statusid'] = STATUS_MARKED; } // Only actually committed to the database if we're not in a submission, or when they are already filled in. $_POST['edited_by'] = $_AUTH['id']; $_POST['edited_date'] = date('Y-m-d H:i:s'); if (!$bSubmit && !(GET && ACTION == 'publish')) { // Put $zData with the old values in $_SESSION for mailing. // FIXME; change owner to owned_by_ in the load entry query of object_individuals.php. $zData['owned_by_'] = $zData['owner'];