$op = '';
}
if (XNP_CONFIG_DOI_FIELD_PARAM_NAME != "") {
    //check doi field format and length(basic information)
    $doi = $formdata->getValue('post', 'doi', 's', false);
    if ($doi != '') {
        $matches = array();
        $res = preg_match('/' . XNP_CONFIG_DOI_FIELD_PARAM_PATTERN . '/', $doi, $matches);
        if (strlen($doi) > XNP_CONFIG_DOI_FIELD_PARAM_MAXLEN || $res == 0 || $matches[0] != $doi) {
            $op = '';
            $system_message .= "\n" . '<br /><span style="color: red;">' . sprintf(_MD_XOONIPS_ITEM_DOI_INVALID_ID, XNP_CONFIG_DOI_FIELD_PARAM_MAXLEN) . '</span><br />';
        }
        //check doi duplication when doi is changed.
        $org_doi = "";
        if (xnpGetDoiByItemId($item_id, $org_doi) == RES_OK) {
            if ($org_doi != $doi && xnpIsDoiExists($doi)) {
                $op = '';
                $system_message .= "\n" . '<br /><span style="color: red;">' . _MD_XOONIPS_ITEM_DOI_DUPLICATE_ID . '</span><br />';
            }
        }
    }
}
//check required field(detail information)
$msg = "";
eval("\$param_check_result = " . $modname . "CheckEditParameters( \$msg );");
if (!$param_check_result) {
    $op = '';
}
if ($op == 'update') {
    //update item
    $f = $itemtype['name'] . 'GetModifiedFields';
}
if ($item_type_id != ITID_INDEX && !$private_index_flag) {
    $op = '';
}
if (XNP_CONFIG_DOI_FIELD_PARAM_NAME != "") {
    //check doi field format and length(basic information)
    $doi = $formdata->getValue('post', 'doi', 's', false);
    if ($doi != '') {
        $matches = array();
        $res = preg_match('/' . XNP_CONFIG_DOI_FIELD_PARAM_PATTERN . '/', $doi, $matches);
        if (strlen($doi) > XNP_CONFIG_DOI_FIELD_PARAM_MAXLEN || $res == 0 || $matches[0] != $doi) {
            $op = '';
            $system_message .= "\n" . '<br /><span style="color: red;">' . sprintf(_MD_XOONIPS_ITEM_DOI_INVALID_ID, XNP_CONFIG_DOI_FIELD_PARAM_MAXLEN) . '</span><br />';
        }
        //check doi duplication
        if (xnpIsDoiExists($doi)) {
            $op = '';
            $system_message .= "\n" . '<br /><span style="color: red;">' . _MD_XOONIPS_ITEM_DOI_DUPLICATE_ID . '</span><br />';
        }
    }
}
//check required field(detail information)
$msg = "";
eval("\$param_check_result = " . $modname . "CheckRegisterParameters( \$msg );");
if (!$param_check_result) {
    $op = '';
}
if (isset($op) && $op == 'register') {
    if (!$xoopsGTicket->check(true, 'register', false)) {
        die('ticket error');
    }