<?php

if (!defined('XOOPS_ROOT_PATH')) exit();

if (!defined('XOONIPS_TRUST_PATH'))
  define('XOONIPS_TRUST_PATH',XOOPS_TRUST_PATH.'/modules/xoonips');

require_once XOOPS_TRUST_PATH.'/libs/xoonips/class/core/Utils.class.php';
Xoonips_Utils::loadModinfoMessage('xoonips');

$modversion['name'] = _MI_XOONIPS_NAME;
$modversion['version'] = 4.00;
$modversion['description'] = _MI_XOONIPS_DESC;
$modversion['credits'] =
  "RIKEN, Japan (http://www.riken.jp/)";
$modversion['author'] =
  "The XooNIps Project (http://sourceforge.jp/projects/xoonips/)";
$modversion['help'] = "help.html";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "images/xoonips_slogo.png";
$modversion['dirname'] = "xoonips";
$modversion['trust_dirname'] = 'xoonips';
$modversion['legacy_installer'] = array(
	'installer'   => array(
		'class' 	=> 'Installer',
		'namespace' => 'Xoonips',
		'filepath'	=> XOONIPS_TRUST_PATH . '/admin/class/installer/XoonipsInstaller.class.php'
	),
	'uninstaller' => array(
		'class' 	=> 'Uninstaller',
		'namespace' => 'Xoonips',
		'filepath'	=> XOONIPS_TRUST_PATH . '/admin/class/installer/XoonipsUninstaller.class.php'
	),
	'updater' => array(
		'class' 	=> 'Updater',
		'namespace' => 'Xoonips',
		'filepath'	=> XOONIPS_TRUST_PATH . '/admin/class/installer/XoonipsUpdater.class.php'
	)
);
$modversion['disable_legacy_2nd_installer'] = false;
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!

$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
$modversion['tables'][0] = "xoonips_item";
$modversion['tables'][1] = "xoonips_index_item_link";
$modversion['tables'][2] = "xoonips_index";
$modversion['tables'][3] = "xoonips_item_changelog";
$modversion['tables'][4] = "xoonips_item_type";
$modversion['tables'][5] = "xoonips_item_file";
$modversion['tables'][6] = "xoonips_config";
$modversion['tables'][7] = "xoonips_event_log";
$modversion['tables'][8] = "xoonips_oaipmh_item_status";
$modversion['tables'][9] = "xoonips_oaipmh_resumption_token";
$modversion['tables'][10] = "xoonips_item_related_to";
$modversion['tables'][11] = "xoonips_search_text";
$modversion['tables'][12] = "xoonips_item_title";
$modversion['tables'][13] = "xoonips_item_keyword";
$modversion['tables'][14] = "xoonips_data_type";
$modversion['tables'][15] = "xoonips_item_type_sort";
$modversion['tables'][16] = "xoonips_view_type";
$modversion['tables'][17] = "xoonips_view_data_relation";
$modversion['tables'][18] = "xoonips_default_item_field_group";
$modversion['tables'][19] = "xoonips_default_item_field_detail";
$modversion['tables'][20] = "xoonips_complement";
$modversion['tables'][21] = "xoonips_complement_detail";
$modversion['tables'][22] = "xoonips_item_field_value_set";
$modversion['tables'][23] = "xoonips_item_field_group";
$modversion['tables'][24] = "xoonips_item_field_detail";
$modversion['tables'][25] = "xoonips_item_field_detail_complement_link";
$modversion['tables'][26] = "xoonips_item_type_sort_detail";
$modversion['tables'][27] = "xoonips_item_users_link";
$modversion['tables'][28] = "xoonips_item_type_search_condition";
$modversion['tables'][29] = "xoonips_oaipmh_schema_item_type_link";
$modversion['tables'][30] = "xoonips_item_type_search_condition_detail";
$modversion['tables'][31] = "xoonips_oaipmh_schema_value_set";
$modversion['tables'][32] = "xoonips_item_extend12";
$modversion['tables'][33] = "xoonips_item_extend13";
$modversion['tables'][34] = "xoonips_item_extend14";
$modversion['tables'][35] = "xoonips_item_extend15";
$modversion['tables'][36] = "xoonips_item_extend16";
$modversion['tables'][37] = "xoonips_item_extend17";
$modversion['tables'][38] = "xoonips_item_extend18";
$modversion['tables'][39] = "xoonips_item_extend19";
$modversion['tables'][40] = "xoonips_item_extend20";
$modversion['tables'][41] = "xoonips_item_extend21";
$modversion['tables'][42] = "xoonips_item_extend22";
$modversion['tables'][43] = "xoonips_item_extend23";
$modversion['tables'][44] = "xoonips_item_extend24";
$modversion['tables'][45] = "xoonips_item_extend25";
$modversion['tables'][46] = "xoonips_item_extend26";
$modversion['tables'][47] = "xoonips_item_extend27";
$modversion['tables'][48] = "xoonips_item_extend28";
$modversion['tables'][49] = "xoonips_item_extend29";
$modversion['tables'][50] = "xoonips_item_extend30";
$modversion['tables'][51] = "xoonips_item_extend31";
$modversion['tables'][52] = "xoonips_item_extend32";
$modversion['tables'][53] = "xoonips_item_extend33";
$modversion['tables'][54] = "xoonips_item_extend34";
$modversion['tables'][55] = "xoonips_item_extend35";
$modversion['tables'][56] = "xoonips_item_extend36";
$modversion['tables'][57] = "xoonips_item_extend37";
$modversion['tables'][58] = "xoonips_item_extend38";
$modversion['tables'][59] = "xoonips_item_extend39";
$modversion['tables'][60] = "xoonips_item_extend40";
$modversion['tables'][61] = "xoonips_item_extend41";
$modversion['tables'][62] = "xoonips_item_extend42";
$modversion['tables'][63] = "xoonips_item_extend43";
$modversion['tables'][64] = "xoonips_item_extend44";
$modversion['tables'][65] = "xoonips_item_extend45";
$modversion['tables'][66] = "xoonips_item_extend49";
$modversion['tables'][67] = "xoonips_item_extend50";
$modversion['tables'][68] = "xoonips_item_extend53";
$modversion['tables'][69] = "xoonips_item_extend54";
$modversion['tables'][70] = "xoonips_item_extend55";
$modversion['tables'][71] = "xoonips_item_extend56";
$modversion['tables'][72] = "xoonips_item_extend57";
$modversion['tables'][73] = "xoonips_item_extend58";
$modversion['tables'][74] = "xoonips_item_extend59";
$modversion['tables'][75] = "xoonips_item_extend60";
$modversion['tables'][76] = "xoonips_item_extend61";
$modversion['tables'][77] = "xoonips_item_extend62";
$modversion['tables'][78] = "xoonips_item_extend63";
$modversion['tables'][79] = "xoonips_oaipmh_schema";
$modversion['tables'][80] = "xoonips_oaipmh_schema_link";
$modversion['tables'][81] = "xoonips_item_type_field_group_link";
$modversion['tables'][82] = "xoonips_item_field_group_field_detail_link";
$modversion['tables'][83] = "xoonips_item_import_log";
$modversion['tables'][84] = "xoonips_item_import_link";
$modversion['tables'][85] = "xoonips_item_extend10";
$modversion['tables'][86] = "xoonips_item_extend11";
$modversion['tables'][87] = "xoonips_item_extend51";
$modversion['tables'][88] = "xoonips_item_extend52";
$modversion['tables'][89] = "xoonips_item_extend64";
$modversion['tables'][90] = "xoonips_item_extend65";

//Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "xoonips_search";

// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][] = array('name'=>_MI_XOONIPS_USER_REGISTER_ITEM,'url'=>'register.php');
$modversion['sub'][] = array('name'=>_MI_XOONIPS_USER_IMPORT_ITEM,'url'=>'itemimport.php');
$modversion['sub'][] = array('name'=>_MI_XOONIPS_USER_SEARCH,'url'=>'search.php?op=quick');
$modversion['sub'][] = array('name'=>_MI_XOONIPS_USER_EDIT_INDEX,'url'=>'editindex.php');

// Templates
$i = 1;
$modversion['templates'][$i]['file'] = 'xoonips_breadcrumbs.inc.html';
$modversion['templates'][$i]['description'] = 'breadcrumbs navigation for each pages';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_register.html';
$modversion['templates'][$i]['description'] = 'register item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_register_confirm.html';
$modversion['templates'][$i]['description'] = 'confirmation before register';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_edit.html';
$modversion['templates'][$i]['description'] = 'edit item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_edit_confirm.html';
$modversion['templates'][$i]['description'] = 'confirm edit item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_detail.html';
$modversion['templates'][$i]['description'] = 'detail item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_delete_confirm.html';
$modversion['templates'][$i]['description'] = 'confirm delete item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_index_list.html';
$modversion['templates'][$i]['description'] = 'edit index page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_index.html';
$modversion['templates'][$i]['description'] = 'xoonips module top page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemtype_block.html';
$modversion['templates'][$i]['description'] = 'xoonips top page itemtype block';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_detail_download_confirm.html';
$modversion['templates'][$i]['description'] = 'download confirmation';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_list_index_block.html';
$modversion['templates'][$i]['description'] = 'index list block';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_notifications.html';
$modversion['templates'][$i]['description'] = 'xoonips notifications';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_tree.html';
$modversion['templates'][$i]['description'] = 'index tree';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_list.html';
$modversion['templates'][$i]['description'] = 'item listing';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemselect_item_list.html';
$modversion['templates'][$i]['description'] = 'item list of itemtypesearch';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_advanced_search_block.html';
$modversion['templates'][$i]['description'] = 'part of form of advanced search';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_advanced_search.html';
$modversion['templates'][$i]['description'] = 'advanced search result form';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_advanced_search.inc.html';
$modversion['templates'][$i]['description'] = 'part of form of advanced search result';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_userselect_sub.html';
$modversion['templates'][$i]['description'] = 'user select sub';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_index_edit.html';
$modversion['templates'][$i]['description'] = 'edit index sub';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_header.html';
$modversion['templates'][$i]['description'] = 'main header';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_footer.html';
$modversion['templates'][$i]['description'] = 'main footer';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_register_select_itemtype.html';
$modversion['templates'][$i]['description'] = 'select itemtype to regist';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_common_msg_sub.html';
$modversion['templates'][$i]['description'] = 'common message page in sub';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_index_delete.html';
$modversion['templates'][$i]['description'] = 'delete index sub page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_index_move.html';
$modversion['templates'][$i]['description'] = 'move index sub page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_error.inc.html';
$modversion['templates'][$i]['description'] = 'xoonips error include';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemselect_sub.html';
$modversion['templates'][$i]['description'] = 'item select sub page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_print.inc.html';
$modversion['templates'][$i]['description'] = 'xoonips print include page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemowners_edit.html';
$modversion['templates'][$i]['description'] = 'edit item users page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemindex_confirm.html';
$modversion['templates'][$i]['description'] = 'item index edit confirm page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_search_tab.inc.html';
$modversion['templates'][$i]['description'] = 'search tab include page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_quicksearch.html';
$modversion['templates'][$i]['description'] = 'quick search page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemindex_edit.html';
$modversion['templates'][$i]['description'] = 'edit item index page';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_register_top.html';
$modversion['templates'][$i]['description'] = 'item register';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_upload_output.html';
$modversion['templates'][$i]['description'] = 'iframe for file upload output';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemtype.html';
$modversion['templates'][$i]['description'] = 'view for itemtype';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_lastupdate.html';
$modversion['templates'][$i]['description'] = 'view for viewtype lastupdate';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_createuser.html';
$modversion['templates'][$i]['description'] = 'view for viewtype createuser';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_changelog.html';
$modversion['templates'][$i]['description'] = 'view for viewtype changelog';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_index.html';
$modversion['templates'][$i]['description'] = 'view for viewtype index';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_relatedTo.html';
$modversion['templates'][$i]['description'] = 'view for viewtype related item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_date.html';
$modversion['templates'][$i]['description'] = 'view for viewtype date';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_preview.html';
$modversion['templates'][$i]['description'] = 'view for viewtype preview';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_fileupload.html';
$modversion['templates'][$i]['description'] = 'view for viewtype fileupload';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_downloadnotify.html';
$modversion['templates'][$i]['description'] = 'view for viewtype downloadnotify';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_readme.html';
$modversion['templates'][$i]['description'] = 'view for viewtype readme';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_rights.html';
$modversion['templates'][$i]['description'] = 'view for viewtype rights';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_url.html';
$modversion['templates'][$i]['description'] = 'view for viewtype url';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_pubmedId.html';
$modversion['templates'][$i]['description'] = 'view for viewtype pubmedId';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_viewtype_isbn.html';
$modversion['templates'][$i]['description'] = 'view for viewtype isbn';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_indextree.html';
$modversion['templates'][$i]['description'] = 'view for index tree';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_workflow.html';
$modversion['templates'][$i]['description'] = 'view for workflow';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_input_text_file_sub.html';
$modversion['templates'][$i]['description'] = 'file select and edit';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_print.css';
$modversion['templates'][$i]['description'] = 'stylesheet for print';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_style.css';
$modversion['templates'][$i]['description'] = 'stylesheet for screen';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemimport.html';
$modversion['templates'][$i]['description'] = 'import item';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemimport_tab.inc.html';
$modversion['templates'][$i]['description'] = 'import item tab';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemimport_log.html';
$modversion['templates'][$i]['description'] = 'import item log';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_itemimport_logdetail.html';
$modversion['templates'][$i]['description'] = 'import item log detail';
$i++;
$modversion['templates'][$i]['file'] = 'xoonips_export_select.html';
$modversion['templates'][$i]['description'] = 'export select';

// Blocks
$modversion['blocks'][1]['file'] = "xoonips_blocks.php";
$modversion['blocks'][1]['name'] = _MI_XOONIPS_ITEM_BNAME1;
$modversion['blocks'][1]['description'] = "Shows xoonips quick search block";
$modversion['blocks'][1]['show_func'] = "b_xoonips_quick_search_show";
$modversion['blocks'][1]['edit_func'] = "";
$modversion['blocks'][1]['template'] = 'xoonips_block_quicksearch.html';
$modversion['blocks'][1]['options'] = "";


$modversion['blocks'][2]['file'] = "xoonips_blocks.php";
$modversion['blocks'][2]['name'] = _MI_XOONIPS_INDEX_BNAME1;
$modversion['blocks'][2]['description'] = "browse block";
$modversion['blocks'][2]['show_func'] = "b_xoonips_tree_show";
$modversion['blocks'][2]['edit_func'] = "";
$modversion['blocks'][2]['template'] = 'xoonips_block_tree.html';
$modversion['blocks'][2]['options'] = "";

$modversion['blocks'][3]['file'] = "xoonips_blocks.php";
$modversion['blocks'][3]['name'] = _MI_XOONIPS_ACCOUNT_BNAME1;
$modversion['blocks'][3]['description'] = "Shows xoonips login block";
$modversion['blocks'][3]['show_func'] = "b_xoonips_login_show";
$modversion['blocks'][3]['edit_func'] = "";
$modversion['blocks'][3]['template'] = 'xoonips_block_login.html';
$modversion['blocks'][3]['options'] = "";

$modversion['blocks'][4]['file'] = "xoonips_blocks.php";
$modversion['blocks'][4]['name'] = _MI_XOONIPS_ACCOUNT_BNAME2;
$modversion['blocks'][4]['description'] = "Shows user menu";
$modversion['blocks'][4]['show_func'] = "b_xoonips_user_show";
$modversion['blocks'][4]['template'] = 'xoonips_block_usermenu.html';

$modversion['blocks'][5]['file'] = "xoonips_blocks.php";
$modversion['blocks'][5]['name'] = _MI_XOONIPS_ITEMTYPE_BNAME1;
$modversion['blocks'][5]['description'] = "Shows itemtypes";
$modversion['blocks'][5]['show_func'] = "b_xoonips_itemtypes_show";
$modversion['blocks'][5]['template'] = 'xoonips_block_itemtypes.html';
$modversion['blocks'][5]['can_clone'] = true;

$modversion['onInstall'] = 'include/oninstall.inc.php';
$modversion['onUpdate'] = 'include/onupdate.inc.php';
$modversion['onUninstall'] = 'include/onuninstall.inc.php';

$modversion['hasNotification'] = 1;
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
$modversion['notification']['lookup_func'] = 'xoonips_notify_iteminfo';

$modversion['notification']['category'][2]['name'] = 'user';
$modversion['notification']['category'][2]['title'] = _MI_XOONIPS_USER_NOTIFY;
$modversion['notification']['category'][2]['description'] = _MI_XOONIPS_USER_NOTIFYDSC;
$modversion['notification']['category'][2]['subscribe_from'] = array( 'notifications.php');

$modversion['notification']['category'][3]['name'] = 'common';
$modversion['notification']['category'][3]['title'] = _MI_XOONIPS_COMMON_NOTIFY;
$modversion['notification']['category'][3]['description'] = _MI_XOONIPS_COMMON_NOTIFYDSC;
$modversion['notification']['category'][3]['subscribe_from'] = array( 'notifications.php');

$modversion['notification']['event'][2]['name'] = 'item_transfer';
$modversion['notification']['event'][2]['category'] = 'user';
$modversion['notification']['event'][2]['title'] = _MI_XOONIPS_USER_ITEM_TRANSFER_NOTIFY;
$modversion['notification']['event'][2]['caption'] = _MI_XOONIPS_USER_ITEM_TRANSFER_NOTIFYCAP;
$modversion['notification']['event'][2]['description'] = _MI_XOONIPS_USER_ITEM_TRANSFER_NOTIFYDSC;
$modversion['notification']['event'][2]['mail_template'] = '';
$modversion['notification']['event'][2]['mail_subject'] = '';

$modversion['notification']['event'][3]['name'] = 'item_updated';
$modversion['notification']['event'][3]['category'] = 'user';
$modversion['notification']['event'][3]['title'] = _MI_XOONIPS_USER_ITEM_UPDATED_NOTIFY;
$modversion['notification']['event'][3]['caption'] = _MI_XOONIPS_USER_ITEM_UPDATED_NOTIFYCAP;
$modversion['notification']['event'][3]['description'] = _MI_XOONIPS_USER_ITEM_UPDATED_NOTIFYDSC;
$modversion['notification']['event'][3]['mail_template'] = '';
$modversion['notification']['event'][3]['mail_subject'] = '';

$modversion['notification']['event'][4]['name'] = 'file_downloaded';
$modversion['notification']['event'][4]['category'] = 'user';
$modversion['notification']['event'][4]['title'] = _MI_XOONIPS_USER_FILE_DOWNLOADED_NOTIFY;
$modversion['notification']['event'][4]['caption'] = _MI_XOONIPS_USER_FILE_DOWNLOADED_NOTIFYCAP;
$modversion['notification']['event'][4]['description'] = _MI_XOONIPS_USER_FILE_DOWNLOADED_NOTIFYDSC;
$modversion['notification']['event'][4]['mail_template'] = '';
$modversion['notification']['event'][4]['mail_subject'] = '';

$modversion['notification']['event'][6]['name'] = 'item';
$modversion['notification']['event'][6]['category'] = 'common';
$modversion['notification']['event'][6]['title'] = _MI_XOONIPS_COMMON_ITEM_NOTIFY;
$modversion['notification']['event'][6]['caption'] = _MI_XOONIPS_COMMON_ITEM_NOTIFYCAP;
$modversion['notification']['event'][6]['description'] = _MI_XOONIPS_COMMON_ITEM_NOTIFYDSC;
$modversion['notification']['event'][6]['mail_template'] = '';
$modversion['notification']['event'][6]['mail_subject'] = '';
