• R/O
  • SSH
  • HTTPS

xoonips: Commit


Commit MetaInfo

Revision107 (tree)
Zeit2012-11-09 18:48:48
Autort_sato

Log Message

release : 3.97 (debug xoonips and user system config)

Ändern Zusammenfassung

Diff

--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/policy_quicksearch.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/policy_quicksearch.php (revision 107)
@@ -4,7 +4,7 @@
44 require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Response.class.php';
55 require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Utils.class.php';
66 require_once XOOPS_ROOT_PATH . '/include/cp_header.php';
7-require_once 'actions/PolicyQuickSearchActionNG.class.php';
7+require_once 'actions/PolicyQuickSearchAction.class.php';
88
99 $request = new Xoonips_Request();
1010 $response = new Xoonips_Response();
--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/SystemNotificationAction.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/SystemNotificationAction.class.php (revision 107)
@@ -87,10 +87,10 @@
8787 $options =& $config_handler->getConfigOptions( new Criteria( 'conf_id', $config[$i]->getVar( 'conf_id' ) ) );
8888 $opcount = count( $options );
8989 for ( $j = 0; $j < $opcount; $j++ ) {
90- if ($j == 1 || $j == 2) continue;
90+ #if ($j == 1 || $j == 2) continue;
9191 $optval = defined( $options[$j]->getVar( 'confop_value' ) ) ? constant( $options[$j]->getVar( 'confop_value' ) ) : $options[$j]->getVar( 'confop_value' );
9292 $optkey = defined( $options[$j]->getVar( 'confop_name' ) ) ? constant( $options[$j]->getVar( 'confop_name' ) ) : $options[$j]->getVar( 'confop_name' );
93- if ($j == 3) $optkey = _AM_XOONIPS_SYSTEM_NOTIFICATION_ENABLED;
93+ #if ($j == 3) $optkey = _AM_XOONIPS_SYSTEM_NOTIFICATION_ENABLED;
9494 $ele->addOption( $optval, $optkey );
9595 }
9696 break;
--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyUserGroupAction.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyUserGroupAction.class.php (revision 107)
@@ -978,15 +978,25 @@
978978 $detailBean = Xoonips_BeanFactory::getBean('UserFieldDetailBean', $this->dirname, $this->trustDirname);
979979 $count = $detailBean->countUserfields();
980980 $userfields_objs = $detailBean->getUserfieldlist($count, 0);
981-
981+ $user_complement = $detailBean->getUserfieldComplementLink();
982+
982983 foreach ($userfields_objs as $userfield) {
983- if ($userfield['released'] == 0) {
984+ if ($userfield['released'] == 0 || $userfield['table_name'] == 'users') {
984985 continue;
985986 }
987+
986988 $userfieldid = $userfield['user_detail_id'];
987989 $name = $userfield['name'];
988990 $xml = $userfield['xml'];
989991 $preselect = $userfield['preselect'];
992+
993+ $chk = true;
994+ foreach ($user_complement as $complement) {
995+ if ($complement['base_user_detail_id'] == $userfieldid
996+ || $complement['user_detail_id'] == $userfieldid) $chk = false;
997+ }
998+ if (!$chk) continue;
999+
9901000 $select = 0;
9911001 foreach ($members as $member) {
9921002 if ($member['user_detail_id'] == $userfieldid
--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyItemTypeAction.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyItemTypeAction.class.php (revision 107)
@@ -2462,6 +2462,7 @@
24622462 if (!$itemtypeBean->copyById($itemtypeid, $map, false, false, true)) return false;
24632463
24642464 if (!$itemtypeBean->copyLinkById($itemtypeid, $map)) return false;
2465+
24652466 $relationBean = Xoonips_BeanFactory::getBean('ItemFieldDetailComplementLinkBean',$this->dirname,$this->trustDirname);
24662467 if (!$relationBean->copyById($itemtypeid, $map, false, false, true)) return false;
24672468 }
--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyQuickSearchAction.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/actions/PolicyQuickSearchAction.class.php (revision 107)
@@ -60,19 +60,16 @@
6060 }
6161 }
6262
63- // get itemtype block
64- $itemtypeBean = Xoonips_BeanFactory::getBean('ItemTypeBean', $this->dirname, $this->trustDirname);
65- $itemtypes = $itemtypeBean->getItemTypeList();
66- $cond_blocks = array();
67- $int = 1;
68- foreach ($itemtypes as $itemtype) {
69- $block = $this->getSearchConditionBlock($int, $itemtype, $cond_id, $op);
70- if ($mode == 1 || $block['checked'] != '') {
71- $cond_blocks[] = $block;
72- }
73- $int++;
63+ // get selected detail
64+ $selected = array();
65+ if (!is_null($cond_id)) {
66+ $condBean = Xoonips_BeanFactory::getBean('ItemTypeSearchConditionDetailBean', $this->dirname, $this->trustDirname);
67+ $selected = $condBean->selectByItemtypeId($cond_id, 0);
7468 }
7569
70+ // get details for select
71+ $itemfields = $this->getDetailsForSelect($selected);
72+
7673 // token ticket
7774 $token_ticket = $this->createToken($this->modulePrefix('admin_policy_quicksearch_default'));
7875
@@ -81,7 +78,7 @@
8178 $viewData['mode'] = $mode;
8279 $viewData['condition_id'] = $cond_id;
8380 $viewData['condition_name'] = $cond_name;
84- $viewData['cond_blocks'] = $cond_blocks;
81+ $viewData['itemfields'] = $itemfields;
8582 $viewData['token_ticket'] = $token_ticket;
8683 $viewData['breadcrumbs'] = $breadcrumbs;
8784 $viewData['title'] = $title;
@@ -95,6 +92,8 @@
9592 }
9693
9794 protected function doSave(&$request, &$response) {
95+
96+ // token ticket
9897 if (!$this->validateToken($this->modulePrefix('admin_policy_quicksearch_default'))) {
9998 $response->setSystemError('Ticket error');
10099 return false;
@@ -112,28 +111,21 @@
112111 $cond_id = $request->getParameter('condition_id');
113112 $cond_name = $request->getParameter('condition_name');
114113
115- // get search condition
116- $conditionBean = Xoonips_BeanFactory::getBean('ItemTypeSearchConditionBean', $this->dirname, $this->trustDirname);
117- $conditions = $conditionBean->select();
118- $condlist = array(array('condition_id' => '0', 'title '=> '-------------'));
119- foreach ($conditions as $cond) {
120- $condition['cond_id'] = $cond['condition_id'];
121- $condition['title'] = $cond['title'];
122- $condition['selected'] = ($cond['condition_id'] == $cond_id) ? 'selected="selected"' : '';
123- $condlist[] = $condition;
124- }
114+ // get fields info
115+ $selected = array();
116+ $itemfieldBean = Xoonips_BeanFactory::getBean('ItemFieldDetailBean', $this->dirname, $this->trustDirname);
117+ $count = $itemfieldBean->countItemfields();
118+ $itemfields_objs = $itemfieldBean->getItemfieldlist($count, 0);
125119
126- // get itemtype block
127- $itemtypeBean = Xoonips_BeanFactory::getBean('ItemTypeBean', $this->dirname, $this->trustDirname);
128- $itemtypes = $itemtypeBean->getItemTypeList();
129- $cond_blocks = array();
130- $int = 1;
131- foreach ($itemtypes as $itemtype) {
132- $cond_blocks[] = $this->getSearchConditionBlock($int, $itemtype, $cond_id, $op);
133- $int++;
120+ foreach ($itemfields_objs as $itemfield) {
121+ $itemfieldid = $itemfield['item_field_detail_id'];
122+ if ($request->getParameter('checkbox_'.$itemfieldid)) {
123+ $selected[] = $itemfieldid;
124+ }
134125 }
135126
136127 // do check
128+ $conditionBean = Xoonips_BeanFactory::getBean('ItemTypeSearchConditionBean', $this->dirname, $this->trustDirname);
137129 $errors = new Xoonips_Errors();
138130 $parameters = array();
139131 $parameters[] = _AM_XOONIPS_POLICY_QUICKSEARCH_ITEM;
@@ -162,6 +154,9 @@
162154 // token ticket
163155 $token_ticket = $this->createToken( $this->modulePrefix('admin_policy_quicksearch_default') );
164156
157+ // get details for select
158+ $itemfields = $this->getDetailsForSelect($selected);
159+
165160 $viewData['op'] = $op;
166161 $viewData['mode'] = 1;
167162 $viewData['condition_id'] = $cond_id;
@@ -168,8 +163,7 @@
168163 $viewData['condition_name'] = $cond_name;
169164 $viewData['errors'] = $errors->getView($this->dirname);
170165
171- $viewData['condlist'] = $condlist;
172- $viewData['cond_blocks'] = $cond_blocks;
166+ $viewData['itemfields'] = $itemfields;
173167 $viewData['token_ticket'] = $token_ticket;
174168 $viewData['breadcrumbs'] = $breadcrumbs;
175169 $viewData['title'] = $title;
@@ -181,7 +175,7 @@
181175
182176 return true;
183177 } else {
184- $ret = $this->saveSearchCondition($cond_id, $cond_name);
178+ $ret = $this->saveSearchCondition($cond_id, $cond_name, $selected);
185179 if (!$ret) {
186180 $complete_msg = _AM_XOONIPS_ERROR_DBUPDATE_FAILED;
187181 } else {
@@ -226,59 +220,6 @@
226220
227221 }
228222
229- // get search condition block
230- function getSearchConditionBlock($int, $itemtype, $cond_id, $op){
231- $itemtype_id = $itemtype['item_type_id'];
232- $itemtype_name = $itemtype['name'];
233- $block = array();
234- $checked = '';
235-
236- $item = new Xoonips_Item($itemtype_id, $this->dirname, $this->trustDirname);
237- if ($op == "save") {
238- $item->setDataFromPost($_POST);
239- $request = new Xoonips_Request();
240- $checkValue = $request->getParameter($itemtype_name);
241- if ($checkValue == 'on') {
242- $checked = 'checked="checked"';
243- }
244- } else {
245- $cond = $this->getSearchConditionDetail($cond_id, $itemtype_id);
246- if (count($cond) > 0) {
247- $checked = 'checked="checked"';
248- }
249- $item->setData($cond);
250- }
251-
252- $block['int'] = $int;
253- $block['itemtype_name'] = $itemtype_name;
254- $block['cond_block'] = $itemtype_name."_cond_block";
255- $block['checked'] = $checked;
256- if ($checked != '') {
257- $block['display'] = 'display:block';
258- } else {
259- $block['display'] = 'display:none';
260- }
261- $block['simpleSearchView'] = $item->getSimpleSearchView();
262- return $block;
263- }
264-
265- // get search condition detail
266- function getSearchConditionDetail($cond_id, $itemtype_id) {
267- $detailBean = Xoonips_BeanFactory::getBean('ItemFieldDetailBean', $this->dirname, $this->trustDirname);
268- $condBean = Xoonips_BeanFactory::getBean('ItemTypeSearchConditionDetailBean', $this->dirname, $this->trustDirname);
269- $condObj = $condBean->selectByItemtypeId($cond_id, $itemtype_id);
270- $ret = array();
271- foreach($condObj as $cond){
272- $groupId = $cond['group_id'];
273-
274- $detailId = $cond['item_field_detail_id'];
275- $itemtypeId = $cond['item_type_id'];
276- $key = $groupId . Xoonips_Enum::ITEM_ID_SEPARATOR . $itemtypeId . Xoonips_Enum::ITEM_ID_SEPARATOR . $detailId;
277- $ret[$key] = "1";
278- }
279- return $ret;
280- }
281-
282223 // delete
283224 function deleteSearchCondition($cond_id){
284225 // transaction
@@ -303,7 +244,7 @@
303244 }
304245
305246 // save
306- function saveSearchCondition($cond_id, $cond_name){
247+ function saveSearchCondition($cond_id, $cond_name, $selected){
307248 // transaction
308249 $transaction = Xoonips_Transaction::getInstance();
309250 $transaction->start();
@@ -336,24 +277,22 @@
336277 }
337278
338279 // insert xoonips_item_type_search_condition_detail
339- $checked_detail = $this->getCheckedDetail();
340280 $condDtetail = array();
341281 $condDtetail['condition_id'] = $newConditinId;
342- foreach($checked_detail as $key=>$itemtype){
343- if ($action_flg=="upd"){
344- // delete old condition detail
345- if (!$condDetailBean->deleteByItemtypeId($cond_id, $key)) {
346- $transaction->rollback();
347- return false;
348- }
282+ if ($action_flg=="upd"){
283+ // delete old condition detail
284+ if (!$condDetailBean->deleteByDetailId($cond_id)) {
285+ $transaction->rollback();
286+ return false;
349287 }
350- $condDtetail['item_type_id'] = $key;
351- foreach($itemtype as $val){
352- $condDtetail['item_field_detail_id'] = $val;
353- if (!$condDetailBean->insert($condDtetail)){
354- $transaction->rollback();
355- return false;
356- }
288+ }
289+
290+ foreach($selected as $key => $detailid){
291+ $condDtetail['item_type_id'] = 0;
292+ $condDtetail['item_field_detail_id'] = $detailid;
293+ if (!$condDetailBean->insert($condDtetail)){
294+ $transaction->rollback();
295+ return false;
357296 }
358297 }
359298 // success
@@ -361,48 +300,6 @@
361300 return true;
362301 }
363302
364- // get checked detail
365- function getCheckedDetail(){
366- $post_data = $_POST;
367- $checkedItemtype = $this->getCheckedItemtype();
368- $checked_var = array();
369- foreach($checkedItemtype as $key=>$value){
370- if ($value === true)
371- $checked_var[$key] = array();
372- }
373- foreach($post_data as $key=>$value){
374- $idArray = explode(Xoonips_Enum::ITEM_ID_SEPARATOR, $key);
375- if (count($idArray) == 3) {
376- if ($checkedItemtype[$idArray[1]] === true){
377- if ($value=='1'){
378- $checked_var[$idArray[1]][] = $idArray[2];
379- }
380- }
381- }
382- }
383- return $checked_var;
384- }
385-
386- // get checked itemtype
387- function getCheckedItemtype(){
388- $checked = array();
389- $request = new Xoonips_Request();
390- $itemTypeBean = Xoonips_BeanFactory::getBean('ItemTypeBean', $this->dirname, $this->trustDirname);
391- $itemtypes = $itemTypeBean->getItemTypeList();
392- if (!$itemtypes) return $checked;
393- foreach ($itemtypes as $itemtype) {
394- $itemtypeId = $itemtype['item_type_id'];
395- $modleName = $itemtype['name'];
396- $checkValue = $request->getParameter($modleName);
397- if ($checkValue == 'on') {
398- $checked[$itemtypeId] = true;
399- } else {
400- $checked[$itemtypeId] = false;
401- }
402- }
403- return $checked;
404- }
405-
406303 private function setBreadcrumbs($isTop) {
407304 $breadcrumbs = array(
408305 array(
@@ -433,5 +330,60 @@
433330 }
434331 return $breadcrumbs;
435332 }
333+
334+ // get details for select
335+ private function getDetailsForSelect($selected=array()) {
336+ $itemfields = array();
337+
338+ $detailBean = Xoonips_BeanFactory::getBean('ItemFieldDetailBean', $this->dirname, $this->trustDirname);
339+ $dataBean = Xoonips_BeanFactory::getBean('DataTypeBean', $this->dirname, $this->trustDirname);
340+ $viewBean = Xoonips_BeanFactory::getBean('ViewTypeBean', $this->dirname, $this->trustDirname);
341+ $count = $detailBean->countItemfields();
342+ $itemfields_objs = $detailBean->getItemfieldlist($count, 0);
343+
344+ foreach ($itemfields_objs as $itemfield) {
345+ if ($itemfield['released'] == 0) {
346+ continue;
347+ }
348+
349+ $itemfieldid = $itemfield['item_field_detail_id'];
350+ $viewId = $itemfield['view_type_id'];
351+ $dataId = $itemfield['data_type_id'];
352+ $name = $itemfield['name'];
353+ $xml = $itemfield['xml'];
354+ $preselect = $itemfield['preselect'];
355+ $select = 0;
356+
357+ $view_arr = $viewBean->getViewtypeById($viewId);
358+ $data_arr = $dataBean->getDatatypeById($dataId);
359+ if (is_array($data_arr)) {
360+ $dname = $data_arr['name'];
361+ if (!($dname == 'varchar' || $dname == 'text')) continue;
362+ else {
363+ if (is_array($view_arr)){
364+ $vname = $view_arr['name'];
365+ if ($vname == 'change_log' || $vname == 'preview'
366+ || $vname == 'file_upload' || $vname == 'rights') continue;
367+ }
368+ }
369+ }
370+
371+ foreach ($selected as $sel) {
372+ if ($sel['item_field_detail_id'] == $itemfieldid){
373+ $select = 1;
374+ }
375+ }
376+
377+ $itemfields[] = array(
378+ 'itemfieldid' => $itemfieldid,
379+ 'name' => $name,
380+ 'xml' => $xml,
381+ 'select' => $select,
382+ );
383+ }
384+
385+ return $itemfields;
386+ }
387+
436388 }
437389
--- trunk/xoonips/xoops_trust_path/modules/xoonips/admin/class/installer/XoonipsInstallUtils.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/admin/class/installer/XoonipsInstallUtils.class.php (revision 107)
@@ -2605,16 +2605,21 @@
26052605 $schema = $obj['schema_id'];
26062606 $obj['schema_id'] = $schemaid[$obj['schema_id']];
26072607 $obj['item_type_id'] = $map['itemtype'][$obj['item_type_id']];
2608+ $obj['group_id'] = NULL;
26082609 if (strpos($schema, 'NIItype') != false || strpos($schema, 'textversion') != false) {
26092610 $obj['item_field_detail_id'] = $valuesetid[$schema . ':' . $obj['item_field_detail_id']];
26102611 } elseif ($obj['item_field_detail_id'] != 'http://' && $obj['item_field_detail_id'] != 'ID'
26112612 && $obj['item_field_detail_id'] != 'itemtype' && $obj['item_field_detail_id'] != 'meta_author') {
2612- $list = array();
2613+ $detail_id_list = array();
2614+ $group_id_list = array();
26132615 $idlist = explode(',', $obj['item_field_detail_id']);
26142616 foreach ($idlist as $id) {
2615- $list[] = $map['detail'][$id];
2617+ $detail_id_list[] = $map['detail'][$id];
2618+ $group_detail_array = explode(':', $id); #index 0 is group_xml
2619+ $group_id_list[] = $map['group'][$group_detail_array[0]];
26162620 }
2617- $obj['item_field_detail_id'] = implode(',', $list);
2621+ $obj['item_field_detail_id'] = implode(',', $detail_id_list);
2622+ $obj['group_id'] = implode(',', $group_id_list);
26182623 }
26192624 if (!$linkBean->insert($obj)) {
26202625 return false;
@@ -2837,7 +2842,7 @@
28372842 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
28382843 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
28392844 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
2840- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
2845+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
28412846 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'type_of_resource', 'name' => _MI_XOONIPS_INSTALL_ARTICEL_RESOURCE,
28422847 'xml' => 'type_of_resource', 'view_type_id' => 'textarea', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
28432848 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
@@ -3007,7 +3012,7 @@
30073012 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
30083013 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
30093014 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3010- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3015+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
30113016 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
30123017 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
30133018 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -3128,7 +3133,7 @@
31283133 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
31293134 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
31303135 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3131- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3136+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
31323137 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'isbn', 'name' => _MI_XOONIPS_INSTALL_BOOK_ISBN,
31333138 'xml' => 'isbn', 'view_type_id' => 'isbn', 'data_type_id' => 'char', 'data_length' => 13, 'data_decimal_places' => -1,
31343139 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
@@ -3291,7 +3296,7 @@
32913296 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
32923297 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
32933298 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3294- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3299+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
32953300 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'ctitle', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
32963301 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
32973302 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -3373,7 +3378,7 @@
33733378 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'conference_place:place', 'value' => NULL),
33743379 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'presentation_abstract:description', 'value' => NULL),
33753380 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
3376- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date_from:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
3381+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date_from:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
33773382 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'conference_presentation_type:conference_presentation_type', 'value' => 'sprintf("presentationType:%s",1)'),
33783383 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
33793384 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL),
@@ -3387,7 +3392,7 @@
33873392 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'conference_place:place', 'value' => NULL),
33883393 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'presentation_abstract:description', 'value' => NULL),
33893394 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
3390- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date_from:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
3395+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date_from:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
33913396 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'conference_presentation_type:conference_presentation_type', 'value' => 'sprintf("presentationType:%s",1)'),
33923397 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
33933398 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL),
@@ -3448,7 +3453,7 @@
34483453 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
34493454 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
34503455 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3451- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3456+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
34523457 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
34533458 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
34543459 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -3536,7 +3541,7 @@
35363541 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
35373542 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
35383543 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
3539- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
3544+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
35403545 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'data_type:data_type', 'value' => 'sprintf("dataType:%s",1)'),
35413546 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
35423547 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Data or Dataset', 'value' => NULL),
@@ -3552,7 +3557,7 @@
35523557 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
35533558 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
35543559 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
3555- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
3560+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
35563561 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'data_type:data_type', 'value' => 'sprintf("dataType:%s",1)'),
35573562 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
35583563 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Data or Dataset', 'value' => NULL),
@@ -3607,7 +3612,7 @@
36073612 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
36083613 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
36093614 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3610- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3615+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
36113616 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
36123617 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
36133618 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -3732,7 +3737,7 @@
37323737 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
37333738 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
37343739 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3735- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3740+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
37363741 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
37373742 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
37383743 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -3862,7 +3867,7 @@
38623867 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
38633868 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
38643869 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
3865- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
3870+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
38663871 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
38673872 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
38683873 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -4024,7 +4029,7 @@
40244029 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
40254030 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
40264031 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4027- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4032+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
40284033 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'pubmedid', 'name' => _MI_XOONIPS_INSTALL_PAPER_PUBMEDID,
40294034 'xml' => 'pubmedid', 'view_type_id' => 'pubmed id', 'data_type_id' => 'varchar', 'data_length' => 30, 'data_decimal_places' => -1,
40304035 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
@@ -4204,7 +4209,7 @@
42044209 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
42054210 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
42064211 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4207- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4212+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
42084213 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
42094214 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
42104215 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -4292,7 +4297,7 @@
42924297 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
42934298 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
42944299 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4295- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4300+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
42964301 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'presentation_type:presentation_type', 'value' => 'sprintf("presentationType:%s",1)'),
42974302 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
42984303 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL),
@@ -4308,7 +4313,7 @@
43084313 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
43094314 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
43104315 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4311- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4316+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
43124317 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'presentation_type:presentation_type', 'value' => 'sprintf("presentationType:%s",1)'),
43134318 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
43144319 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL),
@@ -4369,7 +4374,7 @@
43694374 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
43704375 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
43714376 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4372- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4377+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
43734378 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
43744379 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
43754380 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -4457,7 +4462,7 @@
44574462 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
44584463 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
44594464 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4460- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4465+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
44614466 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'simulator_type:simulator_type', 'value' => 'sprintf("simulatorType:%s",1)'),
44624467 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
44634468 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4473,7 +4478,7 @@
44734478 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
44744479 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
44754480 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4476- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4481+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
44774482 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'simulator_type:simulator_type', 'value' => 'sprintf("simulatorType:%s",1)'),
44784483 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
44794484 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4534,7 +4539,7 @@
45344539 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
45354540 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
45364541 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4537- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4542+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
45384543 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
45394544 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
45404545 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -4622,7 +4627,7 @@
46224627 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
46234628 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
46244629 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4625- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4630+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
46264631 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'stimulus_type:stimulus_type', 'value' => 'sprintf("stimulusType:%s",1)'),
46274632 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
46284633 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4638,7 +4643,7 @@
46384643 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
46394644 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
46404645 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4641- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4646+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
46424647 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'stimulus_type:stimulus_type', 'value' => 'sprintf("stimulusType:%s",1)'),
46434648 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
46444649 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4699,7 +4704,7 @@
46994704 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
47004705 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
47014706 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4702- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4707+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
47034708 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
47044709 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
47054710 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
@@ -4787,7 +4792,7 @@
47874792 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
47884793 array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
47894794 array('schema_id' => 'junii2:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4790- array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4795+ array('schema_id' => 'junii2:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
47914796 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'tool_type:tool_type', 'value' => 'sprintf("toolType:%s",1)'),
47924797 array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
47934798 array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4803,7 +4808,7 @@
48034808 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'),
48044809 array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL),
48054810 array('schema_id' => 'oai_dc:publisher', 'item_field_detail_id' => 'meta_author', 'value' => NULL),
4806- array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y/m/d",sprintf("%s",1))'),
4811+ array('schema_id' => 'oai_dc:date', 'item_field_detail_id' => 'date:date', 'value' => 'date("Y-m-d",sprintf("%s",1))'),
48074812 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'tool_type:tool_type', 'value' => 'sprintf("toolType:%s",1)'),
48084813 array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'),
48094814 array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL),
@@ -4861,7 +4866,7 @@
48614866 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0),
48624867 array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS,
48634868 'xml' => 'lang', 'view_type_id' => 'select', 'data_type_id' => 'char', 'data_length' => 3, 'data_decimal_places' => -1,
4864- 'default_value' => 'eng', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
4869+ 'default_value' => 'jpn', 'list' => 'Language', 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0),
48654870 array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE,
48664871 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1,
48674872 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0),
--- trunk/xoonips/xoops_trust_path/modules/xoonips/xoops_version.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/xoops_version.php (revision 107)
@@ -9,7 +9,7 @@
99 Xoonips_Utils::loadModinfoMessage('xoonips');
1010
1111 $modversion['name'] = _MI_XOONIPS_NAME;
12-$modversion['version'] = 3.96;
12+$modversion['version'] = 3.97;
1313 $modversion['description'] = _MI_XOONIPS_DESC;
1414 $modversion['credits'] =
1515 "RIKEN, Japan (http://www.riken.jp/)";
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/DataTypeBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/DataTypeBean.class.php (revision 107)
@@ -38,7 +38,7 @@
3838 }
3939
4040 /**
41- * select itemtype viewtype
41+ * select itemtype datatype
4242 *
4343 * @param
4444 * @return array
@@ -58,6 +58,26 @@
5858 }
5959
6060 /**
61+ * select itemtype datatype by id
62+ *
63+ * @param
64+ * @return array
65+ */
66+ public function getDatatypeById($dataId) {
67+ $ret = null;
68+ $sql = 'SELECT * FROM '. $this->table . ' where data_type_id=' .$dataId;
69+ $result = $this->execute($sql);
70+ if (!$result) {
71+ return $ret;
72+ }
73+ while ($row = $this->fetchArray($result)) {
74+ $ret = $row;
75+ }
76+ $this->freeRecordSet($result);
77+ return $ret;
78+ }
79+
80+ /**
6181 * select datatype vy name
6282 *
6383 * @param $name name
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ViewTypeBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ViewTypeBean.class.php (revision 107)
@@ -36,6 +36,26 @@
3636 }
3737
3838 /**
39+ * select itemtype viewtype by id
40+ *
41+ * @param
42+ * @return array
43+ */
44+ public function getViewtypeById($viewId) {
45+ $ret = null;
46+ $sql = 'SELECT * FROM '. $this->table . ' where view_type_id=' .$viewId;
47+ $result = $this->execute($sql);
48+ if (!$result) {
49+ return $ret;
50+ }
51+ while ($row = $this->fetchArray($result)) {
52+ $ret = $row;
53+ }
54+ $this->freeRecordSet($result);
55+ return $ret;
56+ }
57+
58+ /**
3959 * select viewtype vy name
4060 *
4161 * @param $name name
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemFieldDetailBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemFieldDetailBean.class.php (revision 107)
@@ -407,7 +407,9 @@
407407 */
408408 public function getGroupDetails($groupId) {
409409 $ret = array();
410- $sql = 'SELECT * FROM ' . $this->table . " WHERE group_id=$groupId ORDER BY weight";
410+ $sql = 'SELECT d.* FROM ' . $this->table . " AS d"
411+ ." INNER JOIN " . $this->grouplinktable . " AS l ON d.item_field_detail_id=l.item_field_detail_id"
412+ ." WHERE l.group_id=$groupId ORDER BY weight";
411413 $result = $this->execute($sql);
412414 if (!$result) {
413415 return $ret;
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemFieldDetailComplementLinkBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemFieldDetailComplementLinkBean.class.php (revision 107)
@@ -261,7 +261,7 @@
261261 $complement['released'] = $import ? $complement['released'] : 0;
262262 if ($type) {
263263 $complement['item_type_id'] = $map['itemtype'][$complement['item_type_id']];
264- if (!$update) {
264+ if (!$update && $import) {
265265 $details = explode(':', $complement['base_item_field_detail_id']);
266266 $group_title = $details[0];
267267 $complement['base_group_id'] = $map['group'][$group_title];
@@ -270,8 +270,8 @@
270270 $group_title = $details[0];
271271 $complement['group_id'] = $map['group'][$group_title];
272272 }
273- }
274- if (!($type && $update)) {
273+ }
274+ if (!$update && $import && $type) {
275275 $complement['base_item_field_detail_id'] = $map['detail'][$complement['base_item_field_detail_id']];
276276 $complement['item_field_detail_id'] = $map['detail'][$complement['item_field_detail_id']];
277277 }
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemTypeBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/ItemTypeBean.class.php (revision 107)
@@ -500,11 +500,24 @@
500500 */
501501 public function copyLinkById($base_id, &$map) {
502502
503+ $detailBean = Xoonips_BeanFactory::getBean('ItemFieldDetailBean', $this->dirname, $this->trustDirname);
504+
503505 $itemtypeId = $map['itemtype'][$base_id];
504506 $groups = $this->getTypeGroups($base_id);
505507 foreach ($groups as $group) {
508+ $gid = $group['group_id'];
509+ $gxml = $group['xml'];
506510 $group['item_type_id'] = $itemtypeId;
507511 $group['released'] = $group['link_release'];
512+
513+ $map['group'][$gxml] = $gid;
514+
515+ $details = $detailBean->getGroupDetails($gid);
516+ foreach ($details as $detail) {
517+ $gdxml = $gxml . ':' . $detail['xml'];
518+ $map['detail'][$gdxml] = $detail['item_field_detail_id'];
519+ }
520+
508521 if (!$this->insertLink($group, $insertId)) return false;
509522 }
510523
--- trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/UserFieldDetailBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/xoonips/class/bean/UserFieldDetailBean.class.php (revision 107)
@@ -20,6 +20,7 @@
2020
2121 $this->typelinktable = $this->prefix(XCUBE_CORE_USER_MODULE_NAME . '_type_field_group_link');
2222 $this->grouplinktable = $this->prefix(XCUBE_CORE_USER_MODULE_NAME . '_field_group_field_detail_link');
23+ $this->complementlink = $this->prefix(XCUBE_CORE_USER_MODULE_NAME . '_field_detail_complement_link');
2324 }
2425
2526 /**
@@ -360,9 +361,10 @@
360361
361362 $createSql = " CREATE TABLE $tableName ("
362363 . " uid int(10) unsigned NOT NULL default '0',"
364+ . " group_id int(10) unsigned default '0',"
363365 . ' value ' . $valueSql[0] . ','
364366 . " occurrence_number smallint(3) unsigned NOT NULL default '1',"
365- . ' PRIMARY KEY (uid, occurrence_number),'
367+ . ' PRIMARY KEY (uid, group_id, occurrence_number),'
366368 . ' KEY value (value' . $valueSql[1] . ')'
367369 . ') ENGINE=InnoDB;';
368370 $createRes = $this->execute($createSql);
@@ -402,6 +404,21 @@
402404 return $ret;
403405 }
404406
407+ // get userfield complement link
408+ public function getUserfieldComplementLink() {
409+ $ret = array();
410+ $sql = 'SELECT * FROM ' . $this->complementlink . ' WHERE complement_id != 0';
411+ $result = $this->execute($sql);
412+ if (!$result) {
413+ return $ret;
414+ }
415+ while ($row = $this->fetchArray($result)) {
416+ $ret[] = $row;
417+ }
418+ $this->freeRecordSet($result);
419+ return $ret;
420+ }
421+
405422 /**
406423 * check exist user_type detail name
407424 *
--- trunk/xoonips/xoops_trust_path/modules/user/language/ja_utf8/modinfo.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/language/ja_utf8/modinfo.php (revision 107)
@@ -163,7 +163,7 @@
163163 define('_MI_USER_CONF_SSLPOST_NAME', "SSLログイン時に使用するPOST変数の名称");
164164 define('_MI_USER_CONF_UNAME_TEST_LEVEL', "ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。");
165165 define('_MI_USER_CONF_UNAME_TEST_LEVEL_NORMAL', "中");
166-define('_MI_USER_CONF_UNAME_TEST_LEVEL_STRONG', "強(アルファベットおよび数字のみ)←推奨");
166+define('_MI_USER_CONF_UNAME_TEST_LEVEL_STRONG', "強(アルファベットおよび数字のみ)");
167167 define('_MI_USER_CONF_UNAME_TEST_LEVEL_WEAK', "弱(漢字・平仮名も使用可)");
168168 define('_MI_USER_CONF_USE_SSL', "ログインにSSLを使用する");
169169 define('_MI_USER_CONF_USERCOOKIE', "ユーザ名の保存に使用するクッキーの名称");
--- trunk/xoonips/xoops_trust_path/modules/user/language/ja_utf8/admin.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/language/ja_utf8/admin.php (revision 107)
@@ -206,6 +206,7 @@
206206 define('_AD_USER_MESSAGE_REGISTRY', '登録しています。');
207207 define('_AD_USER_MESSAGE_UPDATE', '更新しています。');
208208 define('_AD_USER_MESSAGE_DELETE', '削除しています。');
209+define('_AD_USER_MESSAGE_NOTIFICATION_ENABLED', 'この機能を有効にする');
209210
210211 // Tips
211212 define('_AD_USER_TIPS_AVATAR', 'サイトのメンバーに対応してオンライン中のファッションとして独自のアバターを表示します。<br />このオプションは、モジュールのユーザ設定からオフに設定することができます。');
--- trunk/xoonips/xoops_trust_path/modules/user/language/japanese/modinfo.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/language/japanese/modinfo.php (revision 107)
@@ -118,7 +118,7 @@
118118 define('_MI_USER_ADMENU_USER_DATA_CSVUPLOAD', 'ユーザーの一括登録');
119119 define('_MI_USER_ADMENU_USER_DATA_DOWNLOAD', 'ユーザデータのダウンロード');
120120 define('_MI_USER_ADMENU_USER_SEARCH', "ユーザー検索");
121-define('_MI_USER_ADMENU_USER_VALUE_SET', "ユーザ選択値");
121+define('_MI_USER_ADMENU_USER_VALUE_SET', "ユーザフィールド選択リスト管理");
122122 define('_MI_USER_BLOCK_LOGIN_DESC', "ログインフォームを表示します");
123123 define('_MI_USER_BLOCK_LOGIN_NAME', "ログイン");
124124 define('_MI_USER_BLOCK_NEWUSERS_DESC', "新しい登録ユーザの一覧を表示します");
@@ -163,7 +163,7 @@
163163 define('_MI_USER_CONF_SSLPOST_NAME', "SSLログイン時に使用するPOST変数の名称");
164164 define('_MI_USER_CONF_UNAME_TEST_LEVEL', "ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。");
165165 define('_MI_USER_CONF_UNAME_TEST_LEVEL_NORMAL', "中");
166-define('_MI_USER_CONF_UNAME_TEST_LEVEL_STRONG', "強(アルファベットおよび数字のみ)←推奨");
166+define('_MI_USER_CONF_UNAME_TEST_LEVEL_STRONG', "強(アルファベットおよび数字のみ)");
167167 define('_MI_USER_CONF_UNAME_TEST_LEVEL_WEAK', "弱(漢字・平仮名も使用可)");
168168 define('_MI_USER_CONF_USE_SSL', "ログインにSSLを使用する");
169169 define('_MI_USER_CONF_USERCOOKIE', "ユーザ名の保存に使用するクッキーの名称");
@@ -192,7 +192,7 @@
192192 //2011-01-13 add
193193 define('_MI_USER_CONF_CERTIFY_USER', "新規登録ユーザアカウントの承認の方法");
194194 define('_MI_USER_CONF_CER_USER_DESC', "アカウントを有効化されたユーザが XooNIps を利用するためにはそのユーザアカウントを承認する必要があります。ここではこのアカウント承認の方法を設定します。");
195-define('_MI_USER_CONF_USER_CERTIFY_DATE', "アカウントの承認待機期間(単位:日)");
195+define('_MI_USER_CONF_USER_CERTIFY_DATE', "アカウントの承認待機期間(単位:日)");
196196 define('_MI_USER_CONF_LOGIN_AUTH_METHOD', "ログイン認証設定");
197197 define('_MI_USER_CONF_CERTIFY_USER_AUTO', "自動的にアカウントを承認する");
198198 define('_MI_USER_CONF_CERTIFY_USER_BY_MODERATOR', "モデレータが確認してアカウントを承認する");
--- trunk/xoonips/xoops_trust_path/modules/user/language/japanese/admin.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/language/japanese/admin.php (revision 107)
@@ -30,10 +30,11 @@
3030 define('_AD_USER_ERROR_UNAME_NO_UNIQUE', "ユーザー名が重複しています。変更して下さい。");
3131 define('_AD_USER_ERROR_SELECT_NAME_REQUIRED', "ユーザ選択リスト名称を入力してください" );
3232 define('_AD_USER_ERROR_MAXLENGTH', "{0}は{1}文字以内を入力して下さい");
33+define('_AD_USER_ERROR_TITLE_ID_EXISTS', "入力されたコードは既に存在します。" );
3334 define('_AD_USER_ERROR_TITLE_EXISTS', "入力された名称は既に存在します。" );
34-define('_AD_USER_ERROR_TITLE_ID_EXISTS', "入力されたコードは既に存在します。" );
3535 define('_AD_USER_ERROR_SELECT_NAME_EXISTS', "入力されたユーザフィールド選択リスト名称は既に存在します。" );
3636 define('_AD_USER_ERROR_GROUP_DELETE_REQUIRED', "既にこのグループは削除承認待ちです。" );
37+define('_AM_USER_ERROR_VALUE_DELETE', "指定されたコードは使用されているため削除することができません。" );
3738
3839 // LANG
3940 define('_AD_USER_LANG_ALL_OF_USERS', "すべてのユーザー");
@@ -112,8 +113,8 @@
112113 define('_AD_USER_LANG_LASTLOGIN', "最終ログイン");
113114 define('_AD_USER_LANG_LEFT_TARGET_USER', "残送信数");
114115 define('_AD_USER_LANG_LEVEL_ACTIVE', "承認済ユーザ");
116+define('_AD_USER_LANG_LEVEL_PENDING', "未承認ユーザ");
115117 define('_AD_USER_LANG_LEVEL_INACTIVE', "非有効ユーザ");
116-define('_AD_USER_LANG_LEVEL_PENDING', "未承認ユーザ");
117118 define('_AD_USER_LANG_LEVEL_ROOT', "ルートユーザ");
118119 define('_AD_USER_LANG_MAIL_NG_USERS_ONLY', "メール受信NGのユーザのみ");
119120 define('_AD_USER_LANG_MAIL_OK_USERS_ONLY', "メール受信OKのユーザのみ");
@@ -202,6 +203,10 @@
202203 define('_AD_USER_MESSAGE_CONFIRM_UPDATE_USER', 'ユーザーを更新してもよろしいですか?');
203204 define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "再集計に成功しました");
204205 define('_AD_USER_MESSAGE_VALUE_DELETE', '{0}を削除しました。');
206+define('_AD_USER_MESSAGE_REGISTRY', '登録しています。');
207+define('_AD_USER_MESSAGE_UPDATE', '更新しています。');
208+define('_AD_USER_MESSAGE_DELETE', '削除しています。');
209+define('_AD_USER_MESSAGE_NOTIFICATION_ENABLED', 'この機能を有効にする');
205210
206211 // Tips
207212 define('_AD_USER_TIPS_AVATAR', 'サイトのメンバーに対応してオンライン中のファッションとして独自のアバターを表示します。<br />このオプションは、モジュールのユーザ設定からオフに設定することができます。');
--- trunk/xoonips/xoops_trust_path/modules/user/language/english/admin.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/language/english/admin.php (revision 107)
@@ -202,6 +202,7 @@
202202 define('_AD_USER_MESSAGE_CONFIRM_UPDATE_USER', "Are you sure you want to update user?");
203203 define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "Recalculate success");
204204 define('_AD_USER_MESSAGE_VALUE_DELETE', "Deleted {0}.");
205+define('_AD_USER_MESSAGE_NOTIFICATION_ENABLED', 'Enable Notification');
205206
206207 // Tips
207208 define('_AD_USER_TIPS_AVATAR', "Site members can optionally fashion their own online personae called avatars.<br />This option can be set off from module User preferences.");
--- trunk/xoonips/xoops_trust_path/modules/user/sql/mysql.sql (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/sql/mysql.sql (revision 107)
@@ -211,8 +211,10 @@
211211 CREATE TABLE `{prefix}_{dirname}_field_detail_complement_link` (
212212 `seq_id` int(10) unsigned NOT NULL auto_increment,
213213 `complement_id` int(10) unsigned NOT NULL default '0',
214+ `base_group_id` int(10) unsigned default '0',
214215 `base_user_detail_id` int(10) unsigned NOT NULL default '0',
215216 `complement_detail_id` int(10) unsigned NOT NULL default '0',
217+ `group_id` int(10) unsigned default '0',
216218 `user_detail_id` int(10) unsigned NOT NULL default '0',
217219 PRIMARY KEY (`seq_id`)
218220 ) ENGINE=InnoDB;
--- trunk/xoonips/xoops_trust_path/modules/user/xoops_version.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/xoops_version.php (revision 107)
@@ -5,7 +5,7 @@
55 define('USER_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/user');
66 }
77 $modversion['name'] = _MI_USER_NAME;
8-$modversion['version'] = 3.96;
8+$modversion['version'] = 3.97;
99 $modversion['description'] = _MI_USER_NAME_DESC;
1010 $modversion['author'] = "";
1111 $modversion['credits'] = "XOOPS Cube Project";
@@ -263,17 +263,7 @@
263263 "valuetype"=>"int",
264264 "default"=>0
265265 );
266-
267266
268-//$modversion['config'][]=array (
269-// "name"=>"activation_group",
270-// "title"=>"_MI_USER_CONF_ACTV_GROUP",
271-// "description"=>"_MI_USER_CONF_ACTV_GROUP_DESC",
272-// "formtype"=>"group",
273-// "valuetype"=>"int",
274-// "default"=>XOOPS_GROUP_ADMIN
275-// );
276-
277267 $modversion['config'][]=array (
278268 "name"=>"uname_test_level",
279269 "title"=>"_MI_USER_CONF_UNAME_TEST_LEVEL",
@@ -284,23 +274,6 @@
284274 );
285275
286276 $modversion['config'][]=array (
287- "name"=>"avatar_allow_upload",
288- "title"=>"_MI_USER_CONF_AVTR_ALLOW_UP",
289- "formtype"=>"yesno",
290- "valuetype"=>"int",
291- "default"=>0
292- );
293-
294-$modversion['config'][]=array (
295- "name"=>"avatar_minposts",
296- "title"=>"_MI_USER_CONF_AVATAR_MINPOSTS",
297- "description"=>"_MI_USER_CONF_AVT_MIN_DESC",
298- "formtype"=>"textbox",
299- "valuetype"=>"int",
300- "default"=>0
301- );
302-
303-$modversion['config'][]=array (
304277 "name"=>"avatar_width",
305278 "title"=>"_MI_USER_CONF_AVATAR_WIDTH",
306279 "formtype"=>"textbox",
@@ -332,15 +305,6 @@
332305 "default"=>0
333306 );
334307
335-/*$modversion['config'][]=array (
336- "name"=>"login_auth_method",
337- "title"=>"_MI_USER_CONF_LOGIN_AUTH_METHOD",
338- "options"=>array("_MI_USER_CONF_XOONIPS_LABEL"=>"xoonips"),
339- "formtype"=>"select_multi",
340- "valuetype"=>"array",
341- "default"=>""
342- );*/
343-
344308 $modversion['config'][]=array (
345309 "name"=>"self_delete_confirm",
346310 "title"=>"_MI_USER_CONF_SELF_DELETE_CONF",
--- trunk/xoonips/xoops_trust_path/modules/user/class/core/ViewTypeUserName.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/class/core/ViewTypeUserName.class.php (revision 107)
@@ -42,6 +42,24 @@
4242 $parameters[] = $myxoopsConfigUser['minuname'];
4343 $errors->addError('_MD_USER_ERROR_MINLENGTH', $fieldName, $parameters);
4444 }
45+
46+ $chk = true;
47+ switch ($myxoopsConfigUser['uname_test_level']) {
48+ case 0:
49+ if (!ctype_alnum($value)) $chk = false;
50+ break;
51+ case 1:
52+ if (!preg_match('/[\000-\126]/', $value)) $chk = false;
53+ break;
54+ }
55+ if ($chk) {
56+ foreach ($myxoopsConfigUser['bad_unames'] as $bad_uname) {
57+ $preg = '/' . $bad_uname . '/';
58+ if (preg_match($preg, $value)) $chk = false;
59+ }
60+ }
61+ if (!$chk) $errors->addError('_MD_USER_LANG_NAMERESERVED', $fieldName, array());
62+
4563 } else {
4664 $parameters[] = $field->getName();
4765 $errors->addError('_MD_USER_ERROR_REQUIRED', $fieldName, $parameters);
--- trunk/xoonips/xoops_trust_path/modules/user/class/core/UserFieldManager.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/class/core/UserFieldManager.class.php (revision 107)
@@ -104,7 +104,7 @@
104104 . ' from ' . $xoopsDB->prefix($this->dirname . '_field_detail') . ' as d'
105105 . ' left join ' . $xoopsDB->prefix($this->dirname . '_field_group_field_detail_link')
106106 . ' as l on d.user_detail_id=l.user_detail_id'
107- . ' where d.released=1';
107+ . ' where d.released=1 and l.released=1';
108108 if (!$nondisplay) {
109109 $sql .= ' and d.nondisplay=0 order by l.group_id,l.weight';
110110 } else {
--- trunk/xoonips/xoops_trust_path/modules/user/class/core/User.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/class/core/User.class.php (revision 107)
@@ -90,11 +90,12 @@
9090 * int $groupLoopId
9191 * @return string
9292 */
93- protected function getFieldName($field, $groupLoopId, $id = null) {
93+ protected function getFieldName($field, $groupLoopId, $id = null, $gid=0) {
94+ if ($gid == 0) $gid = $field->getFieldGroupId();
9495 if ($id == null) {
95- return $field->getFieldGroupId() . Xoonips_Enum::ITEM_ID_SEPARATOR . $groupLoopId . Xoonips_Enum::ITEM_ID_SEPARATOR . $field->getId();
96+ return $gid . Xoonips_Enum::ITEM_ID_SEPARATOR . $groupLoopId . Xoonips_Enum::ITEM_ID_SEPARATOR . $field->getId();
9697 } else {
97- return $field->getFieldGroupId() . Xoonips_Enum::ITEM_ID_SEPARATOR . $groupLoopId . Xoonips_Enum::ITEM_ID_SEPARATOR . $id;
98+ return $gid . Xoonips_Enum::ITEM_ID_SEPARATOR . $groupLoopId . Xoonips_Enum::ITEM_ID_SEPARATOR . $id;
9899 }
99100 }
100101
@@ -739,22 +740,29 @@
739740 */
740741 private function editUserExtendTable($sqlStrings, $uid) {
741742 $userBean = Xoonips_BeanFactory::getBean('UsersBean', $this->dirname, $this->trustDirname);
742- $columns = '';
743+ $gid = 0;
744+ $column = '';
745+ $del_table = array();
743746 foreach ($sqlStrings as $tableName => $strings) {
744747 //get user_extend[999] table name
745748 if (strPos($tableName, $this->dirname . '_extend') !== false) {
746- //delete data
747- if (!$userBean->deleteUserExtend($tableName, $uid)) {
748- return false;
749+ //delete data
750+ if (!in_array($tableName, $del_table)) {
751+ $del_table[] = $tableName;
752+ if (!$userBean->deleteUserExtend($tableName, $uid)) {
753+ return false;
754+ }
749755 }
750- foreach ($strings as $column => $values) {
751- $loop = 1;
752- foreach ($values as $v) {
753- if (trim($v) != '' && trim($v) != "''") {
754- if (!$userBean->insertExtend($tableName, $uid, $v, $loop)) {
755- $ret = false;
756+ foreach ($strings as $gid => $column_arr) {
757+ foreach ($column_arr as $column => $values) {
758+ $loop = 1;
759+ foreach ($values as $v) {
760+ if (trim($v) != '' && trim($v) != "''") {
761+ if (!$userBean->insertExtend($tableName, $uid, $v, $loop, $gid)) {
762+ $ret = false;
763+ }
764+ $loop++;
756765 }
757- $loop++;
758766 }
759767 }
760768 }
@@ -1332,7 +1340,7 @@
13321340 foreach ($this->fields as $field) {
13331341 //set data
13341342 if ($detailId == $field->getId()) {
1335- $retKey = $this->getFieldName($field, $row['occurrence_number'], $detailId);
1343+ $retKey = $this->getFieldName($field, $row['occurrence_number'], $detailId, $row['group_id']);
13361344 break;
13371345 }
13381346 }
--- trunk/xoonips/xoops_trust_path/modules/user/class/bean/UsersBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/class/bean/UsersBean.class.php (revision 107)
@@ -59,10 +59,10 @@
5959 } else {
6060 $row[$field->getXmlTag()] = 0;
6161 }
62- $values = $this->getUserExtend($field->getTableName(),$id);
63- if(isset($values[0]['value'])){
64- $row[$field->getXmlTag()] = $values[0]['value'];
65- }
62+ $values = $this->getUserExtend($field->getTableName(),$id);
63+ foreach ($values as $value) {
64+ $row[$field->getXmlTag()] = $value['value'];
65+ }
6666 }
6767 }
6868 $resources = array();
@@ -232,9 +232,9 @@
232232 }
233233 }
234234
235- public function insertExtend($table, $uid, $value, $occurrence) {
235+ public function insertExtend($table, $uid, $value, $occurrence, $gid=0) {
236236 $tableName = $this->prefix($table);
237- $sql = "insert into $tableName (uid,value,occurrence_number) values ($uid,$value,$occurrence)";
237+ $sql = "insert into $tableName (uid,group_id,value,occurrence_number) values ($uid,$gid,$value,$occurrence)";
238238 if (!$this->execute($sql)) {
239239 return false;
240240 }
@@ -390,7 +390,7 @@
390390 return true;
391391 }
392392
393- public function setUserExtend($tableName, $uid, $value, $dataType) {
393+ public function setUserExtend($tableName, $uid, $value, $dataType, $gid=0) {
394394 $table = $this->prefix($tableName);
395395 // delete data
396396 if(!$this->deleteUserExtend($tableName,$uid)){
@@ -398,9 +398,9 @@
398398 }
399399 // insert data
400400 if ($dataType == 'int' || $dataType == 'float' || $dataType == 'double' || $dataType == 'date' || $dataType == 'datetype') {
401- $sql = "insert into $table (uid,value,occurrence_number) values($uid,$value,1)";
401+ $sql = "insert into $table (uid,group_id,value,occurrence_number) values($uid,$value,1,$gid)";
402402 } else {
403- $sql = "insert into $table (uid,value,occurrence_number) values($uid," . Xoonips_Utils::convertSQLStr($value) . ",1)";
403+ $sql = "insert into $table (uid,group_id,value,occurrence_number) values($uid,$gid," . Xoonips_Utils::convertSQLStr($value) . ",1)";
404404 }
405405 $result = $this->execute($sql);
406406 if (!$result) {
--- trunk/xoonips/xoops_trust_path/modules/user/class/bean/FieldDetailBean.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/modules/user/class/bean/FieldDetailBean.class.php (revision 107)
@@ -161,9 +161,10 @@
161161
162162 $createSql = " CREATE TABLE $tableName ("
163163 . " uid int(10) unsigned NOT NULL default '0',"
164+ . " group_id int(10) unsigned default '0',"
164165 . ' value ' . $valueSql[0] . ','
165166 . " occurrence_number smallint(3) unsigned NOT NULL default '1',"
166- . ' PRIMARY KEY (uid, occurrence_number),'
167+ . ' PRIMARY KEY (uid, group_id, occurrence_number),'
167168 . ' KEY value (value' . $valueSql[1] . ')'
168169 . ') ENGINE=InnoDB;';
169170 $createRes = $this->execute($createSql);
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypePassword.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypePassword.class.php (revision 107)
@@ -79,7 +79,7 @@
7979 $sqlStrings[$tableName] = &$tableData;
8080 }
8181
82- if (strPos($tableName, 'item_extend') !== false) {
82+ if (strPos($tableName, '_extend') !== false) {
8383 $groupid = $field->getFieldGroupId();
8484 if (isset($tableData[$groupid])) {
8585 $groupData = &$tableData[$groupid];
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/DataTypeFloat.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/DataTypeFloat.class.php (revision 107)
@@ -47,17 +47,17 @@
4747 $parameters = array();
4848 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH');
4949 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
50- } elseif ($field->getLen2() == '') {
50+ } elseif ($field->getDecimalPlaces() == '') {
5151 $parameters = array();
5252 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2');
5353 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', '', $parameters);
54- } elseif ($field->getLen2() < 0) {
54+ } elseif ($field->getDecimalPlaces() < 0) {
5555 $parameters = array();
5656 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2');
5757 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
5858 } else {
5959 if ($field->getDefault() != '' && (!is_numeric($field->getDefault()) ||
60- strlen($field->getDefault()) > $field->getLen() + $field->getLen2() + 1)) {
60+ strlen($field->getDefault()) > $field->getLen() + $field->getDecimalPlaces() + 1)) {
6161 $parameters = array();
6262 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DEFAULT_VALUE');
6363 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeKana.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeKana.class.php (revision 107)
@@ -78,7 +78,7 @@
7878 $tableData = array();
7979 $sqlStrings[$tableName] = &$tableData;
8080 }
81- if (strPos($tableName, 'item_extend') !== false) {
81+ if (strPos($tableName, '_extend') !== false) {
8282 $groupid = $field->getFieldGroupId();
8383 if (isset($tableData[$groupid])) {
8484 $groupData = &$tableData[$groupid];
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeMbyte.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeMbyte.class.php (revision 107)
@@ -52,7 +52,7 @@
5252 $sqlStrings[$tableName] = &$tableData;
5353 }
5454
55- if (strPos($tableName, 'item_extend') !== false) {
55+ if (strPos($tableName, '_extend') !== false) {
5656 $groupid = $field->getFieldGroupId();
5757 if (isset($tableData[$groupid])) {
5858 $groupData = &$tableData[$groupid];
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/Utils.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/Utils.class.php (revision 107)
@@ -409,7 +409,6 @@
409409 $configs['banners'] = $tmp['banners'];
410410 $tmp =& $config_handler->getConfigsByDirname(XCUBE_CORE_USER_MODULE_NAME);
411411 $configs['usercookie'] = $tmp['usercookie'];
412- $configs['avatar_minposts'] = $tmp['avatar_minposts'];
413412 $configs['maxuname'] = $tmp['maxuname'];
414413 $configs['sslloginlink'] = $tmp['sslloginlink'];
415414 $configs['sslpost_name'] = $tmp['sslpost_name'];
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/DataTypeDouble.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/DataTypeDouble.class.php (revision 107)
@@ -47,17 +47,17 @@
4747 $parameters = array();
4848 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH');
4949 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
50- } elseif ($field->getLen2() == '') {
50+ } elseif ($field->getDecimalPlaces() == '') {
5151 $parameters = array();
5252 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2');
5353 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', '', $parameters);
54- } elseif ($field->getLen2() < 0) {
54+ } elseif ($field->getDecimalPlaces() < 0) {
5555 $parameters = array();
5656 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2');
5757 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
5858 } else {
5959 if ($field->getDefault() != '' && (!is_numeric($field->getDefault()) ||
60- strlen($field->getDefault()) > $field->getLen() + $field->getLen2() + 1)) {
60+ strlen($field->getDefault()) > $field->getLen() + $field->getDecimalPlaces() + 1)) {
6161 $parameters = array();
6262 $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DEFAULT_VALUE');
6363 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters);
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeDate.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeDate.class.php (revision 107)
@@ -300,7 +300,7 @@
300300 $sqlStrings[$tableName] = &$tableData;
301301 }
302302
303- if (strPos($tableName, 'item_extend') !== false) {
303+ if (strPos($tableName, '_extend') !== false) {
304304 $groupid = $field->getFieldGroupId();
305305 if (isset($tableData[$groupid])) {
306306 $groupData = &$tableData[$groupid];
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewType.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewType.class.php (revision 107)
@@ -345,7 +345,7 @@
345345 $sqlStrings[$tableName] = &$tableData;
346346 }
347347
348- if (strPos($tableName, 'item_extend') !== false) {
348+ if (strPos($tableName, '_extend') !== false) {
349349 $groupid = $field->getFieldGroupId();
350350 if (isset($tableData[$groupid])) {
351351 $groupData = &$tableData[$groupid];
@@ -729,7 +729,7 @@
729729
730730 /**
731731 *
732- * must Create item_extend table
732+ * must Create user_extend table
733733 *
734734 * @param
735735 * @return boolean
--- trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeEmail.class.php (revision 106)
+++ trunk/xoonips/xoops_trust_path/libs/xoonips/class/core/ViewTypeEmail.class.php (revision 107)
@@ -21,15 +21,27 @@
2121 public function inputCheck(&$errors, $field, $value, $fieldName) {
2222 //dataCheck
2323 $field->getDataType()->inputCheck($errors, $field, $value, $fieldName);
24+ $myxoopsConfigUser = Xoonips_Utils::getXoopsConfigs(XOOPS_CONF_USER);
2425 $char = "/^[_a-z0-9\-+!#$%&'*\/=?^`{|}~]+(\.[_a-z0-9\-+!#$%&'*\/=?^`{|}~]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i";
2526 $parameters = array();
2627 $value = trim($value);
28+ $chk = true;
2729 if ($value != '') {
2830 if (!preg_match($char, $value)) {
2931 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_INVALID_EMAIL', $fieldName, $parameters);
32+ $chk = false;
3033 } elseif ($this->mailIsExist($value)) {
3134 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_EMAILTAKEN', $fieldName, $parameters);
3235 }
36+
37+ if ($chk) {
38+ foreach ($myxoopsConfigUser['bad_emails'] as $bad_email) {
39+ $preg = '/' . $bad_email . '/';
40+ if (preg_match($preg, $value)) $chk = false;
41+ }
42+ if (!$chk) $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_INVALID_EMAIL', $fieldName, $parameters);
43+ }
44+
3345 } else {
3446 $parameters[] = $field->getName();
3547 $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', $fieldName, $parameters);
Show on old repository browser