function xnpbookGetModifiedFields($item_id)
{
    $ret = array();
    $detail = xnpbookGetDetailInformation($item_id);
    $formdata =& xoonips_getutility('formdata');
    if ($detail) {
        foreach (array('editor' => _MD_XNPBOOK_EDITOR_LABEL, 'publisher' => _MD_XNPBOOK_PUBLISHER_LABEL, 'isbn' => _MD_XNPBOOK_ISBN_LABEL, 'url' => _MD_XNPBOOK_URL_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k]['value'] != $tmp) {
                array_push($ret, $v);
            }
        }
        // was pdf file modified?
        if (xnpIsAttachmentModified('book_pdf', $item_id)) {
            array_push($ret, _MD_XNPBOOK_PDF_LABEL);
        }
        $formdata =& xoonips_getutility('formdata');
        $author_handler =& xoonips_getormhandler('xnpbook', 'author');
        $author_objs =& $formdata->getObjectArray('post', $author_handler->getTableName(), $author_handler, false);
        $detail_handler =& xoonips_getormhandler('xnpbook', 'item_detail');
        $detail_orm =& $detail_handler->get($item_id);
        $author_old_objs =& $detail_orm->getAuthors();
        if (!xoonips_is_same_objects($author_old_objs, $author_objs)) {
            array_push($ret, _MD_XNPBOOK_AUTHOR_LABEL);
        }
    }
    return $ret;
}
function xnpmodelGetModifiedFields($item_id)
{
    $ret = array();
    $formdata =& xoonips_getutility('formdata');
    $detail = xnpmodelGetDetailInformation($item_id);
    if ($detail) {
        foreach (array('model_type' => _MD_XNPMODEL_MODEL_TYPE_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k]['value'] != $tmp) {
                array_push($ret, $v);
            }
        }
        // is readme modified ?
        foreach (array('readme' => _MD_XOONIPS_ITEM_README_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', "{$k}EncText", 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($tmp != $detail[$k]['value']) {
                array_push($ret, $v);
            }
        }
        // is rights modified ?
        $rightsUseCC = $formdata->getValue('post', 'rightsUseCC', 'i', false);
        $rightsEncText = $formdata->getValue('post', 'rightsEncText', 's', false);
        if ($rightsUseCC !== NULL) {
            if ($rightsUseCC == 0) {
                if (array_key_exists('rights', $detail) && $rightsEncText != NULL && $rightsEncText != $detail['rights']['value']) {
                    array_push($ret, _MD_XOONIPS_ITEM_RIGHTS_LABEL);
                }
            } else {
                if ($rightsUseCC == 1) {
                    foreach (array('rightsCCCommercialUse' => 'cc_commercial_use', 'rightsCCModification' => 'cc_modification') as $k => $v) {
                        $tmp = $formdata->getValue('post', $k, 'i', false);
                        if (!array_key_exists($v, $detail) || $tmp === NULL) {
                            continue;
                        }
                        if ($tmp != $detail[$v]['value']) {
                            array_push($ret, _MD_XOONIPS_ITEM_RIGHTS_LABEL);
                            break;
                        }
                    }
                }
            }
        }
        // was model file modified?
        if (xnpIsAttachmentModified('model_data', $item_id)) {
            array_push($ret, _MD_XNPMODEL_MODEL_FILE_LABEL);
        }
        $creator_handler =& xoonips_getormhandler('xnpmodel', 'creator');
        $creator_objs =& $formdata->getObjectArray('post', $creator_handler->getTableName(), $creator_handler, false);
        $detail_handler =& xoonips_getormhandler('xnpmodel', 'item_detail');
        $detail_orm =& $detail_handler->get($item_id);
        $creator_old_objs =& $detail_orm->getCreators();
        if (!xoonips_is_same_objects($creator_old_objs, $creator_objs)) {
            array_push($ret, _MD_XNPMODEL_CREATOR_LABEL);
        }
    }
    return $ret;
}
function xnppresentationGetModifiedFields($item_id)
{
    $formdata =& xoonips_getutility('formdata');
    $ret = array();
    $basic = xnpGetBasicInformationArray($item_id);
    if ($basic) {
        $publicationDateMonth = $formdata->getValue('post', 'publicationDateMonth', 'i', true);
        $publicationDateDay = $formdata->getValue('post', 'publicationDateDay', 'i', true);
        $publicationDateYear = $formdata->getValue('post', 'publicationDateYear', 'i', true);
        if (intval($basic['publication_month']) != intval($publicationDateMonth) || intval($basic['publication_mday']) != intval($publicationDateDay) || intval($basic['publication_year']) != intval($publicationDateYear)) {
            array_push($ret, _MD_XNPPRESENTATION_DATE_LABEL);
        }
    }
    $detail = xnppresentationGetDetailInformation($item_id);
    if ($detail) {
        foreach (array('presentation_type' => _MD_XNPPRESENTATION_PRESENTATION_TYPE_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // is readme modified ?
        foreach (array('readme' => _MD_XOONIPS_ITEM_README_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', "{$k}EncText", 's', true);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // is rights modified ?
        $rightsUseCC = $formdata->getValue('post', 'rightsUseCC', 'i', true);
        $rightsEncText = $formdata->getValue('post', 'rightsEncText', 's', true);
        if ($rightsUseCC !== NULL) {
            if ($rightsUseCC == 0) {
                if (array_key_exists('rights', $detail) && $rightsEncText != NULL && $rightsEncText != $detail['rights']) {
                    array_push($ret, _MD_XOONIPS_ITEM_RIGHTS_LABEL);
                }
            } else {
                if ($rightsUseCC == 1) {
                    foreach (array('rightsCCCommercialUse' => 'cc_commercial_use', 'rightsCCModification' => 'cc_modification') as $k => $v) {
                        $tmp = $formdata->getValue('post', $k, 'i', true);
                        if (!array_key_exists($v, $detail) || $tmp === NULL) {
                            continue;
                        }
                        if ($tmp != $detail[$v]) {
                            array_push($ret, _MD_XOONIPS_ITEM_RIGHTS_LABEL);
                            break;
                        }
                    }
                }
            }
        }
        // is modified data files ?
        if (xnpIsAttachmentModified('presentation_file', $item_id)) {
            array_push($ret, _MD_XNPPRESENTATION_PRESENTATION_FILE_LABEL);
        }
        $creator_handler =& xoonips_getormhandler('xnppresentation', 'creator');
        $creator_objs =& $formdata->getObjectArray('post', $creator_handler->getTableName(), $creator_handler, false);
        $detail_handler =& xoonips_getormhandler('xnppresentation', 'item_detail');
        $detail_orm =& $detail_handler->get($item_id);
        $creator_old_objs =& $detail_orm->getCreators();
        if (!xoonips_is_same_objects($creator_old_objs, $creator_objs)) {
            array_push($ret, _MD_XNPPRESENTATION_CREATOR_LABEL);
        }
    }
    return $ret;
}
function xnpconferenceGetModifiedFields($item_id)
{
    $ret = array();
    $detail = xnpconferenceGetDetailInformation($item_id);
    $formdata =& xoonips_getutility('formdata');
    if ($detail) {
        foreach (array('presentation_type' => _MD_XNPCONFERENCE_PRESENTATION_TYPE_LABEL, 'conference_title' => _MD_XNPCONFERENCE_CONFERENCE_TITLE_LABEL, 'place' => _MD_XNPCONFERENCE_PLACE_LABEL, 'abstract' => _MD_XNPCONFERENCE_ABSTRACT_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // was data file modified?
        if (xnpIsAttachmentModified('conference_file', $item_id)) {
            array_push($ret, _MD_XNPCONFERENCE_PRESENTATION_FILE_LABEL);
        }
        if (xnpIsAttachmentModified('conference_paper', $item_id)) {
            array_push($ret, _MD_XNPCONFERENCE_CONFERENCE_PAPER_LABEL);
        }
        // conference date
        $date_map = array('conference_from_year' => 'conferenceFromYear', 'conference_from_month' => 'conferenceFromMonth', 'conference_from_mday' => 'conferenceFromDay', 'conference_to_year' => 'conferenceToYear', 'conference_to_month' => 'conferenceToMonth', 'conference_to_mday' => 'conferenceToDay');
        foreach ($date_map as $k => $v) {
            if ($detail[$k] != $formdata->getValue('post', $v, 'i', false)) {
                array_push($ret, _MD_XNPCONFERENCE_DATE_LABEL);
                break;
            }
        }
        $author_handler =& xoonips_getormhandler('xnpconference', 'author');
        $author_objs =& $formdata->getObjectArray('post', $author_handler->getTableName(), $author_handler, false);
        $detail_handler =& xoonips_getormhandler('xnpconference', 'item_detail');
        $detail_orm =& $detail_handler->get($item_id);
        $author_old_objs =& $detail_orm->getAuthors();
        if (!xoonips_is_same_objects($author_old_objs, $author_objs)) {
            array_push($ret, _MD_XNPCONFERENCE_AUTHOR_LABEL);
        }
    }
    return $ret;
}
function xnpfilesGetModifiedFields($item_id)
{
    $ret = array();
    $formdata =& xoonips_getutility('formdata');
    $basic = xnpGetBasicInformationArray($item_id);
    $detail = xnpfilesGetDetailInformation($item_id);
    if ($detail) {
        // was data file modified?
        if (xnpIsAttachmentModified('files_file', $item_id)) {
            array_push($ret, _MD_XNPFILES_DATA_FILE_LABEL);
        }
    }
    return $ret;
}
function xnppaperGetModifiedFields($item_id)
{
    $ret = array();
    $formdata =& xoonips_getutility('formdata');
    $basic = xnpGetBasicInformationArray($item_id);
    if ($basic) {
        $publicationDateMonth = $formdata->getValue('post', 'publicationDateMonth', 'i', false);
        $publicationDateDay = $formdata->getValue('post', 'publicationDateDay', 'i', false);
        $publicationDateYear = $formdata->getValue('post', 'publicationDateYear', 'i', false);
        if (intval($basic['publication_month']) != intval($publicationDateMonth) || intval($basic['publication_mday']) != intval($publicationDateDay) || intval($basic['publication_year']) != intval($publicationDateYear)) {
            array_push($ret, _MD_XNPPAPER_YEAR_OF_PUBLICATION_LABEL);
        }
    }
    $detail = xnppaperGetDetailInformation($item_id);
    if ($detail) {
        foreach (array('journal' => _MD_XNPPAPER_JOURNAL_LABEL, 'volume' => _MD_XNPPAPER_VOLUME_LABEL, 'number' => _MD_XNPPAPER_NUMBER_LABEL, 'page' => _MD_XNPPAPER_PAGE_LABEL, 'abstract' => _MD_XNPPAPER_ABSTRACT_LABEL, 'pubmed_id' => _MD_XNPPAPER_PUBMED_ID_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // is modified pdf files?
        if (xnpIsAttachmentModified('paper_pdf_reprint', $item_id)) {
            array_push($ret, _MD_XNPPAPER_PDF_REPRINT_LABEL);
        }
        $author_handler =& xoonips_getormhandler('xnppaper', 'author');
        $author_objs =& $formdata->getObjectArray('post', $author_handler->getTableName(), $author_handler, false);
        $detail_handler =& xoonips_getormhandler('xnppaper', 'item_detail');
        $detail_orm =& $detail_handler->get($item_id);
        $author_old_objs =& $detail_orm->getAuthors();
        if (!xoonips_is_same_objects($author_old_objs, $author_objs)) {
            array_push($ret, _MD_XNPPAPER_AUTHOR_LABEL);
        }
    }
    return $ret;
}
function xnpmemoGetModifiedFields($item_id)
{
    $ret = array();
    $formdata =& xoonips_getutility('formdata');
    $detail = xnpmemoGetDetailInformation($item_id);
    if ($detail) {
        foreach (array('item_link' => _MD_XNPMEMO_ITEM_LINK_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // was banner file modified?
        if (xnpIsAttachmentModified('memo_file', $item_id)) {
            array_push($ret, _MD_XNPMEMO_MEMO_FILE_LABEL);
        }
    }
    return $ret;
}
function xnpurlGetModifiedFields($item_id)
{
    $formdata =& xoonips_getutility('formdata');
    $ret = array();
    $detail = xnpurlGetDetailInformation($item_id);
    if ($detail) {
        foreach (array('url' => _MD_XNPURL_URL_LABEL) as $k => $v) {
            $tmp = $formdata->getValue('post', $k, 's', false);
            if (!array_key_exists($k, $detail) || $tmp === NULL) {
                continue;
            }
            if ($detail[$k] != $tmp) {
                array_push($ret, $v);
            }
        }
        // is modified banner files ?
        if (xnpIsAttachmentModified('url_banner_file', $item_id)) {
            array_push($ret, _MD_XNPURL_URL_BANNER_FILE_LABEL);
        }
    }
    return $ret;
}