release : 3.97 (debug xoonips and user system config)
@@ -4,7 +4,7 @@ | ||
4 | 4 | require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Response.class.php'; |
5 | 5 | require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Utils.class.php'; |
6 | 6 | require_once XOOPS_ROOT_PATH . '/include/cp_header.php'; |
7 | -require_once 'actions/PolicyQuickSearchActionNG.class.php'; | |
7 | +require_once 'actions/PolicyQuickSearchAction.class.php'; | |
8 | 8 | |
9 | 9 | $request = new Xoonips_Request(); |
10 | 10 | $response = new Xoonips_Response(); |
@@ -87,10 +87,10 @@ | ||
87 | 87 | $options =& $config_handler->getConfigOptions( new Criteria( 'conf_id', $config[$i]->getVar( 'conf_id' ) ) ); |
88 | 88 | $opcount = count( $options ); |
89 | 89 | for ( $j = 0; $j < $opcount; $j++ ) { |
90 | - if ($j == 1 || $j == 2) continue; | |
90 | + #if ($j == 1 || $j == 2) continue; | |
91 | 91 | $optval = defined( $options[$j]->getVar( 'confop_value' ) ) ? constant( $options[$j]->getVar( 'confop_value' ) ) : $options[$j]->getVar( 'confop_value' ); |
92 | 92 | $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; | |
94 | 94 | $ele->addOption( $optval, $optkey ); |
95 | 95 | } |
96 | 96 | break; |
@@ -978,15 +978,25 @@ | ||
978 | 978 | $detailBean = Xoonips_BeanFactory::getBean('UserFieldDetailBean', $this->dirname, $this->trustDirname); |
979 | 979 | $count = $detailBean->countUserfields(); |
980 | 980 | $userfields_objs = $detailBean->getUserfieldlist($count, 0); |
981 | - | |
981 | + $user_complement = $detailBean->getUserfieldComplementLink(); | |
982 | + | |
982 | 983 | foreach ($userfields_objs as $userfield) { |
983 | - if ($userfield['released'] == 0) { | |
984 | + if ($userfield['released'] == 0 || $userfield['table_name'] == 'users') { | |
984 | 985 | continue; |
985 | 986 | } |
987 | + | |
986 | 988 | $userfieldid = $userfield['user_detail_id']; |
987 | 989 | $name = $userfield['name']; |
988 | 990 | $xml = $userfield['xml']; |
989 | 991 | $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 | + | |
990 | 1000 | $select = 0; |
991 | 1001 | foreach ($members as $member) { |
992 | 1002 | if ($member['user_detail_id'] == $userfieldid |
@@ -2462,6 +2462,7 @@ | ||
2462 | 2462 | if (!$itemtypeBean->copyById($itemtypeid, $map, false, false, true)) return false; |
2463 | 2463 | |
2464 | 2464 | if (!$itemtypeBean->copyLinkById($itemtypeid, $map)) return false; |
2465 | + | |
2465 | 2466 | $relationBean = Xoonips_BeanFactory::getBean('ItemFieldDetailComplementLinkBean',$this->dirname,$this->trustDirname); |
2466 | 2467 | if (!$relationBean->copyById($itemtypeid, $map, false, false, true)) return false; |
2467 | 2468 | } |
@@ -60,19 +60,16 @@ | ||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
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); | |
74 | 68 | } |
75 | 69 | |
70 | + // get details for select | |
71 | + $itemfields = $this->getDetailsForSelect($selected); | |
72 | + | |
76 | 73 | // token ticket |
77 | 74 | $token_ticket = $this->createToken($this->modulePrefix('admin_policy_quicksearch_default')); |
78 | 75 |
@@ -81,7 +78,7 @@ | ||
81 | 78 | $viewData['mode'] = $mode; |
82 | 79 | $viewData['condition_id'] = $cond_id; |
83 | 80 | $viewData['condition_name'] = $cond_name; |
84 | - $viewData['cond_blocks'] = $cond_blocks; | |
81 | + $viewData['itemfields'] = $itemfields; | |
85 | 82 | $viewData['token_ticket'] = $token_ticket; |
86 | 83 | $viewData['breadcrumbs'] = $breadcrumbs; |
87 | 84 | $viewData['title'] = $title; |
@@ -95,6 +92,8 @@ | ||
95 | 92 | } |
96 | 93 | |
97 | 94 | protected function doSave(&$request, &$response) { |
95 | + | |
96 | + // token ticket | |
98 | 97 | if (!$this->validateToken($this->modulePrefix('admin_policy_quicksearch_default'))) { |
99 | 98 | $response->setSystemError('Ticket error'); |
100 | 99 | return false; |
@@ -112,28 +111,21 @@ | ||
112 | 111 | $cond_id = $request->getParameter('condition_id'); |
113 | 112 | $cond_name = $request->getParameter('condition_name'); |
114 | 113 | |
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); | |
125 | 119 | |
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 | + } | |
134 | 125 | } |
135 | 126 | |
136 | 127 | // do check |
128 | + $conditionBean = Xoonips_BeanFactory::getBean('ItemTypeSearchConditionBean', $this->dirname, $this->trustDirname); | |
137 | 129 | $errors = new Xoonips_Errors(); |
138 | 130 | $parameters = array(); |
139 | 131 | $parameters[] = _AM_XOONIPS_POLICY_QUICKSEARCH_ITEM; |
@@ -162,6 +154,9 @@ | ||
162 | 154 | // token ticket |
163 | 155 | $token_ticket = $this->createToken( $this->modulePrefix('admin_policy_quicksearch_default') ); |
164 | 156 | |
157 | + // get details for select | |
158 | + $itemfields = $this->getDetailsForSelect($selected); | |
159 | + | |
165 | 160 | $viewData['op'] = $op; |
166 | 161 | $viewData['mode'] = 1; |
167 | 162 | $viewData['condition_id'] = $cond_id; |
@@ -168,8 +163,7 @@ | ||
168 | 163 | $viewData['condition_name'] = $cond_name; |
169 | 164 | $viewData['errors'] = $errors->getView($this->dirname); |
170 | 165 | |
171 | - $viewData['condlist'] = $condlist; | |
172 | - $viewData['cond_blocks'] = $cond_blocks; | |
166 | + $viewData['itemfields'] = $itemfields; | |
173 | 167 | $viewData['token_ticket'] = $token_ticket; |
174 | 168 | $viewData['breadcrumbs'] = $breadcrumbs; |
175 | 169 | $viewData['title'] = $title; |
@@ -181,7 +175,7 @@ | ||
181 | 175 | |
182 | 176 | return true; |
183 | 177 | } else { |
184 | - $ret = $this->saveSearchCondition($cond_id, $cond_name); | |
178 | + $ret = $this->saveSearchCondition($cond_id, $cond_name, $selected); | |
185 | 179 | if (!$ret) { |
186 | 180 | $complete_msg = _AM_XOONIPS_ERROR_DBUPDATE_FAILED; |
187 | 181 | } else { |
@@ -226,59 +220,6 @@ | ||
226 | 220 | |
227 | 221 | } |
228 | 222 | |
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 | - | |
282 | 223 | // delete |
283 | 224 | function deleteSearchCondition($cond_id){ |
284 | 225 | // transaction |
@@ -303,7 +244,7 @@ | ||
303 | 244 | } |
304 | 245 | |
305 | 246 | // save |
306 | - function saveSearchCondition($cond_id, $cond_name){ | |
247 | + function saveSearchCondition($cond_id, $cond_name, $selected){ | |
307 | 248 | // transaction |
308 | 249 | $transaction = Xoonips_Transaction::getInstance(); |
309 | 250 | $transaction->start(); |
@@ -336,24 +277,22 @@ | ||
336 | 277 | } |
337 | 278 | |
338 | 279 | // insert xoonips_item_type_search_condition_detail |
339 | - $checked_detail = $this->getCheckedDetail(); | |
340 | 280 | $condDtetail = array(); |
341 | 281 | $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; | |
349 | 287 | } |
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; | |
357 | 296 | } |
358 | 297 | } |
359 | 298 | // success |
@@ -361,48 +300,6 @@ | ||
361 | 300 | return true; |
362 | 301 | } |
363 | 302 | |
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 | - | |
406 | 303 | private function setBreadcrumbs($isTop) { |
407 | 304 | $breadcrumbs = array( |
408 | 305 | array( |
@@ -433,5 +330,60 @@ | ||
433 | 330 | } |
434 | 331 | return $breadcrumbs; |
435 | 332 | } |
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 | + | |
436 | 388 | } |
437 | 389 |
@@ -2605,16 +2605,21 @@ | ||
2605 | 2605 | $schema = $obj['schema_id']; |
2606 | 2606 | $obj['schema_id'] = $schemaid[$obj['schema_id']]; |
2607 | 2607 | $obj['item_type_id'] = $map['itemtype'][$obj['item_type_id']]; |
2608 | + $obj['group_id'] = NULL; | |
2608 | 2609 | if (strpos($schema, 'NIItype') != false || strpos($schema, 'textversion') != false) { |
2609 | 2610 | $obj['item_field_detail_id'] = $valuesetid[$schema . ':' . $obj['item_field_detail_id']]; |
2610 | 2611 | } elseif ($obj['item_field_detail_id'] != 'http://' && $obj['item_field_detail_id'] != 'ID' |
2611 | 2612 | && $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(); | |
2613 | 2615 | $idlist = explode(',', $obj['item_field_detail_id']); |
2614 | 2616 | 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]]; | |
2616 | 2620 | } |
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); | |
2618 | 2623 | } |
2619 | 2624 | if (!$linkBean->insert($obj)) { |
2620 | 2625 | return false; |
@@ -2837,7 +2842,7 @@ | ||
2837 | 2842 | 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0), |
2838 | 2843 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
2839 | 2844 | '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), | |
2841 | 2846 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'type_of_resource', 'name' => _MI_XOONIPS_INSTALL_ARTICEL_RESOURCE, |
2842 | 2847 | 'xml' => 'type_of_resource', 'view_type_id' => 'textarea', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
2843 | 2848 | 'essential' => 0, 'detail_target' => 0, 'scope_search' => 0), |
@@ -3007,7 +3012,7 @@ | ||
3007 | 3012 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3008 | 3013 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3009 | 3014 | '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), | |
3011 | 3016 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3012 | 3017 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3013 | 3018 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3128,7 +3133,7 @@ | ||
3128 | 3133 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3129 | 3134 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3130 | 3135 | '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), | |
3132 | 3137 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'isbn', 'name' => _MI_XOONIPS_INSTALL_BOOK_ISBN, |
3133 | 3138 | 'xml' => 'isbn', 'view_type_id' => 'isbn', 'data_type_id' => 'char', 'data_length' => 13, 'data_decimal_places' => -1, |
3134 | 3139 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3291,7 +3296,7 @@ | ||
3291 | 3296 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3292 | 3297 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3293 | 3298 | '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), | |
3295 | 3300 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'ctitle', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3296 | 3301 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3297 | 3302 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3373,7 +3378,7 @@ | ||
3373 | 3378 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'conference_place:place', 'value' => NULL), |
3374 | 3379 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'presentation_abstract:description', 'value' => NULL), |
3375 | 3380 | 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))'), | |
3377 | 3382 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'conference_presentation_type:conference_presentation_type', 'value' => 'sprintf("presentationType:%s",1)'), |
3378 | 3383 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
3379 | 3384 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL), |
@@ -3387,7 +3392,7 @@ | ||
3387 | 3392 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'conference_place:place', 'value' => NULL), |
3388 | 3393 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'presentation_abstract:description', 'value' => NULL), |
3389 | 3394 | 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))'), | |
3391 | 3396 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'conference_presentation_type:conference_presentation_type', 'value' => 'sprintf("presentationType:%s",1)'), |
3392 | 3397 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
3393 | 3398 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL), |
@@ -3448,7 +3453,7 @@ | ||
3448 | 3453 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3449 | 3454 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3450 | 3455 | '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), | |
3452 | 3457 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3453 | 3458 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3454 | 3459 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3536,7 +3541,7 @@ | ||
3536 | 3541 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
3537 | 3542 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
3538 | 3543 | 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))'), | |
3540 | 3545 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'data_type:data_type', 'value' => 'sprintf("dataType:%s",1)'), |
3541 | 3546 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
3542 | 3547 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Data or Dataset', 'value' => NULL), |
@@ -3552,7 +3557,7 @@ | ||
3552 | 3557 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
3553 | 3558 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
3554 | 3559 | 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))'), | |
3556 | 3561 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'data_type:data_type', 'value' => 'sprintf("dataType:%s",1)'), |
3557 | 3562 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
3558 | 3563 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Data or Dataset', 'value' => NULL), |
@@ -3607,7 +3612,7 @@ | ||
3607 | 3612 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3608 | 3613 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3609 | 3614 | '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), | |
3611 | 3616 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3612 | 3617 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3613 | 3618 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3732,7 +3737,7 @@ | ||
3732 | 3737 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3733 | 3738 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3734 | 3739 | '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), | |
3736 | 3741 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3737 | 3742 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3738 | 3743 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -3862,7 +3867,7 @@ | ||
3862 | 3867 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
3863 | 3868 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
3864 | 3869 | '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), | |
3866 | 3871 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
3867 | 3872 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
3868 | 3873 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4024,7 +4029,7 @@ | ||
4024 | 4029 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4025 | 4030 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4026 | 4031 | '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), | |
4028 | 4033 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'pubmedid', 'name' => _MI_XOONIPS_INSTALL_PAPER_PUBMEDID, |
4029 | 4034 | 'xml' => 'pubmedid', 'view_type_id' => 'pubmed id', 'data_type_id' => 'varchar', 'data_length' => 30, 'data_decimal_places' => -1, |
4030 | 4035 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4204,7 +4209,7 @@ | ||
4204 | 4209 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4205 | 4210 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4206 | 4211 | '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), | |
4208 | 4213 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
4209 | 4214 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
4210 | 4215 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4292,7 +4297,7 @@ | ||
4292 | 4297 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4293 | 4298 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4294 | 4299 | 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))'), | |
4296 | 4301 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'presentation_type:presentation_type', 'value' => 'sprintf("presentationType:%s",1)'), |
4297 | 4302 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4298 | 4303 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL), |
@@ -4308,7 +4313,7 @@ | ||
4308 | 4313 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4309 | 4314 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4310 | 4315 | 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))'), | |
4312 | 4317 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'presentation_type:presentation_type', 'value' => 'sprintf("presentationType:%s",1)'), |
4313 | 4318 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4314 | 4319 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Presentation', 'value' => NULL), |
@@ -4369,7 +4374,7 @@ | ||
4369 | 4374 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4370 | 4375 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4371 | 4376 | '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), | |
4373 | 4378 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
4374 | 4379 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
4375 | 4380 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4457,7 +4462,7 @@ | ||
4457 | 4462 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4458 | 4463 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4459 | 4464 | 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))'), | |
4461 | 4466 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'simulator_type:simulator_type', 'value' => 'sprintf("simulatorType:%s",1)'), |
4462 | 4467 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4463 | 4468 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4473,7 +4478,7 @@ | ||
4473 | 4478 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4474 | 4479 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4475 | 4480 | 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))'), | |
4477 | 4482 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'simulator_type:simulator_type', 'value' => 'sprintf("simulatorType:%s",1)'), |
4478 | 4483 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4479 | 4484 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4534,7 +4539,7 @@ | ||
4534 | 4539 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4535 | 4540 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4536 | 4541 | '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), | |
4538 | 4543 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
4539 | 4544 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
4540 | 4545 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4622,7 +4627,7 @@ | ||
4622 | 4627 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4623 | 4628 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4624 | 4629 | 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))'), | |
4626 | 4631 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'stimulus_type:stimulus_type', 'value' => 'sprintf("stimulusType:%s",1)'), |
4627 | 4632 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4628 | 4633 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4638,7 +4643,7 @@ | ||
4638 | 4643 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4639 | 4644 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4640 | 4645 | 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))'), | |
4642 | 4647 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'stimulus_type:stimulus_type', 'value' => 'sprintf("stimulusType:%s",1)'), |
4643 | 4648 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4644 | 4649 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4699,7 +4704,7 @@ | ||
4699 | 4704 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4700 | 4705 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4701 | 4706 | '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), | |
4703 | 4708 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
4704 | 4709 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
4705 | 4710 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -4787,7 +4792,7 @@ | ||
4787 | 4792 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4788 | 4793 | array('schema_id' => 'junii2:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4789 | 4794 | 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))'), | |
4791 | 4796 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'tool_type:tool_type', 'value' => 'sprintf("toolType:%s",1)'), |
4792 | 4797 | array('schema_id' => 'junii2:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4793 | 4798 | array('schema_id' => 'junii2:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4803,7 +4808,7 @@ | ||
4803 | 4808 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'readme:readme', 'value' => 'sprintf("readme:%s",1)'), |
4804 | 4809 | array('schema_id' => 'oai_dc:description', 'item_field_detail_id' => 'rights:rights', 'value' => NULL), |
4805 | 4810 | 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))'), | |
4807 | 4812 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'tool_type:tool_type', 'value' => 'sprintf("toolType:%s",1)'), |
4808 | 4813 | array('schema_id' => 'oai_dc:type', 'item_field_detail_id' => 'itemtype', 'value' => 'sprintf("itemType:%s",1)'), |
4809 | 4814 | array('schema_id' => 'oai_dc:type:NIItype', 'item_field_detail_id' => 'Software', 'value' => NULL), |
@@ -4861,7 +4866,7 @@ | ||
4861 | 4866 | 'essential' => 0, 'detail_target' => 1, 'scope_search' => 0), |
4862 | 4867 | array('table_name' => 'item_extend', 'column_name' => 'value', 'group_id' => 'langs', 'name' => _MI_XOONIPS_INSTALL_COMMON_LANGS, |
4863 | 4868 | '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), | |
4865 | 4870 | array('table_name' => 'item_title', 'column_name' => 'title', 'group_id' => 'title', 'name' => _MI_XOONIPS_INSTALL_COMMON_TITLE, |
4866 | 4871 | 'xml' => 'title', 'view_type_id' => 'title', 'data_type_id' => 'text', 'data_length' => -1, 'data_decimal_places' => -1, |
4867 | 4872 | 'essential' => 1, 'detail_target' => 1, 'scope_search' => 0), |
@@ -9,7 +9,7 @@ | ||
9 | 9 | Xoonips_Utils::loadModinfoMessage('xoonips'); |
10 | 10 | |
11 | 11 | $modversion['name'] = _MI_XOONIPS_NAME; |
12 | -$modversion['version'] = 3.96; | |
12 | +$modversion['version'] = 3.97; | |
13 | 13 | $modversion['description'] = _MI_XOONIPS_DESC; |
14 | 14 | $modversion['credits'] = |
15 | 15 | "RIKEN, Japan (http://www.riken.jp/)"; |
@@ -38,7 +38,7 @@ | ||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * select itemtype viewtype | |
41 | + * select itemtype datatype | |
42 | 42 | * |
43 | 43 | * @param |
44 | 44 | * @return array |
@@ -58,6 +58,26 @@ | ||
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
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 | + /** | |
61 | 81 | * select datatype vy name |
62 | 82 | * |
63 | 83 | * @param $name name |
@@ -36,6 +36,26 @@ | ||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
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 | + /** | |
39 | 59 | * select viewtype vy name |
40 | 60 | * |
41 | 61 | * @param $name name |
@@ -407,7 +407,9 @@ | ||
407 | 407 | */ |
408 | 408 | public function getGroupDetails($groupId) { |
409 | 409 | $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"; | |
411 | 413 | $result = $this->execute($sql); |
412 | 414 | if (!$result) { |
413 | 415 | return $ret; |
@@ -261,7 +261,7 @@ | ||
261 | 261 | $complement['released'] = $import ? $complement['released'] : 0; |
262 | 262 | if ($type) { |
263 | 263 | $complement['item_type_id'] = $map['itemtype'][$complement['item_type_id']]; |
264 | - if (!$update) { | |
264 | + if (!$update && $import) { | |
265 | 265 | $details = explode(':', $complement['base_item_field_detail_id']); |
266 | 266 | $group_title = $details[0]; |
267 | 267 | $complement['base_group_id'] = $map['group'][$group_title]; |
@@ -270,8 +270,8 @@ | ||
270 | 270 | $group_title = $details[0]; |
271 | 271 | $complement['group_id'] = $map['group'][$group_title]; |
272 | 272 | } |
273 | - } | |
274 | - if (!($type && $update)) { | |
273 | + } | |
274 | + if (!$update && $import && $type) { | |
275 | 275 | $complement['base_item_field_detail_id'] = $map['detail'][$complement['base_item_field_detail_id']]; |
276 | 276 | $complement['item_field_detail_id'] = $map['detail'][$complement['item_field_detail_id']]; |
277 | 277 | } |
@@ -500,11 +500,24 @@ | ||
500 | 500 | */ |
501 | 501 | public function copyLinkById($base_id, &$map) { |
502 | 502 | |
503 | + $detailBean = Xoonips_BeanFactory::getBean('ItemFieldDetailBean', $this->dirname, $this->trustDirname); | |
504 | + | |
503 | 505 | $itemtypeId = $map['itemtype'][$base_id]; |
504 | 506 | $groups = $this->getTypeGroups($base_id); |
505 | 507 | foreach ($groups as $group) { |
508 | + $gid = $group['group_id']; | |
509 | + $gxml = $group['xml']; | |
506 | 510 | $group['item_type_id'] = $itemtypeId; |
507 | 511 | $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 | + | |
508 | 521 | if (!$this->insertLink($group, $insertId)) return false; |
509 | 522 | } |
510 | 523 |
@@ -20,6 +20,7 @@ | ||
20 | 20 | |
21 | 21 | $this->typelinktable = $this->prefix(XCUBE_CORE_USER_MODULE_NAME . '_type_field_group_link'); |
22 | 22 | $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'); | |
23 | 24 | } |
24 | 25 | |
25 | 26 | /** |
@@ -360,9 +361,10 @@ | ||
360 | 361 | |
361 | 362 | $createSql = " CREATE TABLE $tableName (" |
362 | 363 | . " uid int(10) unsigned NOT NULL default '0'," |
364 | + . " group_id int(10) unsigned default '0'," | |
363 | 365 | . ' value ' . $valueSql[0] . ',' |
364 | 366 | . " occurrence_number smallint(3) unsigned NOT NULL default '1'," |
365 | - . ' PRIMARY KEY (uid, occurrence_number),' | |
367 | + . ' PRIMARY KEY (uid, group_id, occurrence_number),' | |
366 | 368 | . ' KEY value (value' . $valueSql[1] . ')' |
367 | 369 | . ') ENGINE=InnoDB;'; |
368 | 370 | $createRes = $this->execute($createSql); |
@@ -402,6 +404,21 @@ | ||
402 | 404 | return $ret; |
403 | 405 | } |
404 | 406 | |
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 | + | |
405 | 422 | /** |
406 | 423 | * check exist user_type detail name |
407 | 424 | * |
@@ -163,7 +163,7 @@ | ||
163 | 163 | define('_MI_USER_CONF_SSLPOST_NAME', "SSLログイン時に使用するPOST変数の名称"); |
164 | 164 | define('_MI_USER_CONF_UNAME_TEST_LEVEL', "ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。"); |
165 | 165 | 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', "強(アルファベットおよび数字のみ)"); | |
167 | 167 | define('_MI_USER_CONF_UNAME_TEST_LEVEL_WEAK', "弱(漢字・平仮名も使用可)"); |
168 | 168 | define('_MI_USER_CONF_USE_SSL', "ログインにSSLを使用する"); |
169 | 169 | define('_MI_USER_CONF_USERCOOKIE', "ユーザ名の保存に使用するクッキーの名称"); |
@@ -206,6 +206,7 @@ | ||
206 | 206 | define('_AD_USER_MESSAGE_REGISTRY', '登録しています。'); |
207 | 207 | define('_AD_USER_MESSAGE_UPDATE', '更新しています。'); |
208 | 208 | define('_AD_USER_MESSAGE_DELETE', '削除しています。'); |
209 | +define('_AD_USER_MESSAGE_NOTIFICATION_ENABLED', 'この機能を有効にする'); | |
209 | 210 | |
210 | 211 | // Tips |
211 | 212 | define('_AD_USER_TIPS_AVATAR', 'サイトのメンバーに対応してオンライン中のファッションとして独自のアバターを表示します。<br />このオプションは、モジュールのユーザ設定からオフに設定することができます。'); |
@@ -118,7 +118,7 @@ | ||
118 | 118 | define('_MI_USER_ADMENU_USER_DATA_CSVUPLOAD', 'ユーザーの一括登録'); |
119 | 119 | define('_MI_USER_ADMENU_USER_DATA_DOWNLOAD', 'ユーザデータのダウンロード'); |
120 | 120 | define('_MI_USER_ADMENU_USER_SEARCH', "ユーザー検索"); |
121 | -define('_MI_USER_ADMENU_USER_VALUE_SET', "ユーザ選択値"); | |
121 | +define('_MI_USER_ADMENU_USER_VALUE_SET', "ユーザフィールド選択リスト管理"); | |
122 | 122 | define('_MI_USER_BLOCK_LOGIN_DESC', "ログインフォームを表示します"); |
123 | 123 | define('_MI_USER_BLOCK_LOGIN_NAME', "ログイン"); |
124 | 124 | define('_MI_USER_BLOCK_NEWUSERS_DESC', "新しい登録ユーザの一覧を表示します"); |
@@ -163,7 +163,7 @@ | ||
163 | 163 | define('_MI_USER_CONF_SSLPOST_NAME', "SSLログイン時に使用するPOST変数の名称"); |
164 | 164 | define('_MI_USER_CONF_UNAME_TEST_LEVEL', "ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。"); |
165 | 165 | 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', "強(アルファベットおよび数字のみ)"); | |
167 | 167 | define('_MI_USER_CONF_UNAME_TEST_LEVEL_WEAK', "弱(漢字・平仮名も使用可)"); |
168 | 168 | define('_MI_USER_CONF_USE_SSL', "ログインにSSLを使用する"); |
169 | 169 | define('_MI_USER_CONF_USERCOOKIE', "ユーザ名の保存に使用するクッキーの名称"); |
@@ -192,7 +192,7 @@ | ||
192 | 192 | //2011-01-13 add |
193 | 193 | define('_MI_USER_CONF_CERTIFY_USER', "新規登録ユーザアカウントの承認の方法"); |
194 | 194 | define('_MI_USER_CONF_CER_USER_DESC', "アカウントを有効化されたユーザが XooNIps を利用するためにはそのユーザアカウントを承認する必要があります。ここではこのアカウント承認の方法を設定します。"); |
195 | -define('_MI_USER_CONF_USER_CERTIFY_DATE', "アカウントの承認待機期間(単位:日)"); | |
195 | +define('_MI_USER_CONF_USER_CERTIFY_DATE', "アカウントの承認待機期間(単位:日)"); | |
196 | 196 | define('_MI_USER_CONF_LOGIN_AUTH_METHOD', "ログイン認証設定"); |
197 | 197 | define('_MI_USER_CONF_CERTIFY_USER_AUTO', "自動的にアカウントを承認する"); |
198 | 198 | define('_MI_USER_CONF_CERTIFY_USER_BY_MODERATOR', "モデレータが確認してアカウントを承認する"); |
@@ -30,10 +30,11 @@ | ||
30 | 30 | define('_AD_USER_ERROR_UNAME_NO_UNIQUE', "ユーザー名が重複しています。変更して下さい。"); |
31 | 31 | define('_AD_USER_ERROR_SELECT_NAME_REQUIRED', "ユーザ選択リスト名称を入力してください" ); |
32 | 32 | define('_AD_USER_ERROR_MAXLENGTH', "{0}は{1}文字以内を入力して下さい"); |
33 | +define('_AD_USER_ERROR_TITLE_ID_EXISTS', "入力されたコードは既に存在します。" ); | |
33 | 34 | define('_AD_USER_ERROR_TITLE_EXISTS', "入力された名称は既に存在します。" ); |
34 | -define('_AD_USER_ERROR_TITLE_ID_EXISTS', "入力されたコードは既に存在します。" ); | |
35 | 35 | define('_AD_USER_ERROR_SELECT_NAME_EXISTS', "入力されたユーザフィールド選択リスト名称は既に存在します。" ); |
36 | 36 | define('_AD_USER_ERROR_GROUP_DELETE_REQUIRED', "既にこのグループは削除承認待ちです。" ); |
37 | +define('_AM_USER_ERROR_VALUE_DELETE', "指定されたコードは使用されているため削除することができません。" ); | |
37 | 38 | |
38 | 39 | // LANG |
39 | 40 | define('_AD_USER_LANG_ALL_OF_USERS', "すべてのユーザー"); |
@@ -112,8 +113,8 @@ | ||
112 | 113 | define('_AD_USER_LANG_LASTLOGIN', "最終ログイン"); |
113 | 114 | define('_AD_USER_LANG_LEFT_TARGET_USER', "残送信数"); |
114 | 115 | define('_AD_USER_LANG_LEVEL_ACTIVE', "承認済ユーザ"); |
116 | +define('_AD_USER_LANG_LEVEL_PENDING', "未承認ユーザ"); | |
115 | 117 | define('_AD_USER_LANG_LEVEL_INACTIVE', "非有効ユーザ"); |
116 | -define('_AD_USER_LANG_LEVEL_PENDING', "未承認ユーザ"); | |
117 | 118 | define('_AD_USER_LANG_LEVEL_ROOT', "ルートユーザ"); |
118 | 119 | define('_AD_USER_LANG_MAIL_NG_USERS_ONLY', "メール受信NGのユーザのみ"); |
119 | 120 | define('_AD_USER_LANG_MAIL_OK_USERS_ONLY', "メール受信OKのユーザのみ"); |
@@ -202,6 +203,10 @@ | ||
202 | 203 | define('_AD_USER_MESSAGE_CONFIRM_UPDATE_USER', 'ユーザーを更新してもよろしいですか?'); |
203 | 204 | define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "再集計に成功しました"); |
204 | 205 | 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', 'この機能を有効にする'); | |
205 | 210 | |
206 | 211 | // Tips |
207 | 212 | define('_AD_USER_TIPS_AVATAR', 'サイトのメンバーに対応してオンライン中のファッションとして独自のアバターを表示します。<br />このオプションは、モジュールのユーザ設定からオフに設定することができます。'); |
@@ -202,6 +202,7 @@ | ||
202 | 202 | define('_AD_USER_MESSAGE_CONFIRM_UPDATE_USER', "Are you sure you want to update user?"); |
203 | 203 | define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "Recalculate success"); |
204 | 204 | define('_AD_USER_MESSAGE_VALUE_DELETE', "Deleted {0}."); |
205 | +define('_AD_USER_MESSAGE_NOTIFICATION_ENABLED', 'Enable Notification'); | |
205 | 206 | |
206 | 207 | // Tips |
207 | 208 | 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."); |
@@ -211,8 +211,10 @@ | ||
211 | 211 | CREATE TABLE `{prefix}_{dirname}_field_detail_complement_link` ( |
212 | 212 | `seq_id` int(10) unsigned NOT NULL auto_increment, |
213 | 213 | `complement_id` int(10) unsigned NOT NULL default '0', |
214 | + `base_group_id` int(10) unsigned default '0', | |
214 | 215 | `base_user_detail_id` int(10) unsigned NOT NULL default '0', |
215 | 216 | `complement_detail_id` int(10) unsigned NOT NULL default '0', |
217 | + `group_id` int(10) unsigned default '0', | |
216 | 218 | `user_detail_id` int(10) unsigned NOT NULL default '0', |
217 | 219 | PRIMARY KEY (`seq_id`) |
218 | 220 | ) ENGINE=InnoDB; |
@@ -5,7 +5,7 @@ | ||
5 | 5 | define('USER_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/user'); |
6 | 6 | } |
7 | 7 | $modversion['name'] = _MI_USER_NAME; |
8 | -$modversion['version'] = 3.96; | |
8 | +$modversion['version'] = 3.97; | |
9 | 9 | $modversion['description'] = _MI_USER_NAME_DESC; |
10 | 10 | $modversion['author'] = ""; |
11 | 11 | $modversion['credits'] = "XOOPS Cube Project"; |
@@ -263,17 +263,7 @@ | ||
263 | 263 | "valuetype"=>"int", |
264 | 264 | "default"=>0 |
265 | 265 | ); |
266 | - | |
267 | 266 | |
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 | - | |
277 | 267 | $modversion['config'][]=array ( |
278 | 268 | "name"=>"uname_test_level", |
279 | 269 | "title"=>"_MI_USER_CONF_UNAME_TEST_LEVEL", |
@@ -284,23 +274,6 @@ | ||
284 | 274 | ); |
285 | 275 | |
286 | 276 | $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 ( | |
304 | 277 | "name"=>"avatar_width", |
305 | 278 | "title"=>"_MI_USER_CONF_AVATAR_WIDTH", |
306 | 279 | "formtype"=>"textbox", |
@@ -332,15 +305,6 @@ | ||
332 | 305 | "default"=>0 |
333 | 306 | ); |
334 | 307 | |
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 | - | |
344 | 308 | $modversion['config'][]=array ( |
345 | 309 | "name"=>"self_delete_confirm", |
346 | 310 | "title"=>"_MI_USER_CONF_SELF_DELETE_CONF", |
@@ -42,6 +42,24 @@ | ||
42 | 42 | $parameters[] = $myxoopsConfigUser['minuname']; |
43 | 43 | $errors->addError('_MD_USER_ERROR_MINLENGTH', $fieldName, $parameters); |
44 | 44 | } |
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 | + | |
45 | 63 | } else { |
46 | 64 | $parameters[] = $field->getName(); |
47 | 65 | $errors->addError('_MD_USER_ERROR_REQUIRED', $fieldName, $parameters); |
@@ -104,7 +104,7 @@ | ||
104 | 104 | . ' from ' . $xoopsDB->prefix($this->dirname . '_field_detail') . ' as d' |
105 | 105 | . ' left join ' . $xoopsDB->prefix($this->dirname . '_field_group_field_detail_link') |
106 | 106 | . ' 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'; | |
108 | 108 | if (!$nondisplay) { |
109 | 109 | $sql .= ' and d.nondisplay=0 order by l.group_id,l.weight'; |
110 | 110 | } else { |
@@ -90,11 +90,12 @@ | ||
90 | 90 | * int $groupLoopId |
91 | 91 | * @return string |
92 | 92 | */ |
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(); | |
94 | 95 | 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(); | |
96 | 97 | } 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; | |
98 | 99 | } |
99 | 100 | } |
100 | 101 |
@@ -739,22 +740,29 @@ | ||
739 | 740 | */ |
740 | 741 | private function editUserExtendTable($sqlStrings, $uid) { |
741 | 742 | $userBean = Xoonips_BeanFactory::getBean('UsersBean', $this->dirname, $this->trustDirname); |
742 | - $columns = ''; | |
743 | + $gid = 0; | |
744 | + $column = ''; | |
745 | + $del_table = array(); | |
743 | 746 | foreach ($sqlStrings as $tableName => $strings) { |
744 | 747 | //get user_extend[999] table name |
745 | 748 | 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 | + } | |
749 | 755 | } |
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++; | |
756 | 765 | } |
757 | - $loop++; | |
758 | 766 | } |
759 | 767 | } |
760 | 768 | } |
@@ -1332,7 +1340,7 @@ | ||
1332 | 1340 | foreach ($this->fields as $field) { |
1333 | 1341 | //set data |
1334 | 1342 | 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']); | |
1336 | 1344 | break; |
1337 | 1345 | } |
1338 | 1346 | } |
@@ -59,10 +59,10 @@ | ||
59 | 59 | } else { |
60 | 60 | $row[$field->getXmlTag()] = 0; |
61 | 61 | } |
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 | + } | |
66 | 66 | } |
67 | 67 | } |
68 | 68 | $resources = array(); |
@@ -232,9 +232,9 @@ | ||
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | - public function insertExtend($table, $uid, $value, $occurrence) { | |
235 | + public function insertExtend($table, $uid, $value, $occurrence, $gid=0) { | |
236 | 236 | $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)"; | |
238 | 238 | if (!$this->execute($sql)) { |
239 | 239 | return false; |
240 | 240 | } |
@@ -390,7 +390,7 @@ | ||
390 | 390 | return true; |
391 | 391 | } |
392 | 392 | |
393 | - public function setUserExtend($tableName, $uid, $value, $dataType) { | |
393 | + public function setUserExtend($tableName, $uid, $value, $dataType, $gid=0) { | |
394 | 394 | $table = $this->prefix($tableName); |
395 | 395 | // delete data |
396 | 396 | if(!$this->deleteUserExtend($tableName,$uid)){ |
@@ -398,9 +398,9 @@ | ||
398 | 398 | } |
399 | 399 | // insert data |
400 | 400 | 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)"; | |
402 | 402 | } 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)"; | |
404 | 404 | } |
405 | 405 | $result = $this->execute($sql); |
406 | 406 | if (!$result) { |
@@ -161,9 +161,10 @@ | ||
161 | 161 | |
162 | 162 | $createSql = " CREATE TABLE $tableName (" |
163 | 163 | . " uid int(10) unsigned NOT NULL default '0'," |
164 | + . " group_id int(10) unsigned default '0'," | |
164 | 165 | . ' value ' . $valueSql[0] . ',' |
165 | 166 | . " occurrence_number smallint(3) unsigned NOT NULL default '1'," |
166 | - . ' PRIMARY KEY (uid, occurrence_number),' | |
167 | + . ' PRIMARY KEY (uid, group_id, occurrence_number),' | |
167 | 168 | . ' KEY value (value' . $valueSql[1] . ')' |
168 | 169 | . ') ENGINE=InnoDB;'; |
169 | 170 | $createRes = $this->execute($createSql); |
@@ -79,7 +79,7 @@ | ||
79 | 79 | $sqlStrings[$tableName] = &$tableData; |
80 | 80 | } |
81 | 81 | |
82 | - if (strPos($tableName, 'item_extend') !== false) { | |
82 | + if (strPos($tableName, '_extend') !== false) { | |
83 | 83 | $groupid = $field->getFieldGroupId(); |
84 | 84 | if (isset($tableData[$groupid])) { |
85 | 85 | $groupData = &$tableData[$groupid]; |
@@ -47,17 +47,17 @@ | ||
47 | 47 | $parameters = array(); |
48 | 48 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH'); |
49 | 49 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
50 | - } elseif ($field->getLen2() == '') { | |
50 | + } elseif ($field->getDecimalPlaces() == '') { | |
51 | 51 | $parameters = array(); |
52 | 52 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2'); |
53 | 53 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', '', $parameters); |
54 | - } elseif ($field->getLen2() < 0) { | |
54 | + } elseif ($field->getDecimalPlaces() < 0) { | |
55 | 55 | $parameters = array(); |
56 | 56 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2'); |
57 | 57 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
58 | 58 | } else { |
59 | 59 | 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)) { | |
61 | 61 | $parameters = array(); |
62 | 62 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DEFAULT_VALUE'); |
63 | 63 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
@@ -78,7 +78,7 @@ | ||
78 | 78 | $tableData = array(); |
79 | 79 | $sqlStrings[$tableName] = &$tableData; |
80 | 80 | } |
81 | - if (strPos($tableName, 'item_extend') !== false) { | |
81 | + if (strPos($tableName, '_extend') !== false) { | |
82 | 82 | $groupid = $field->getFieldGroupId(); |
83 | 83 | if (isset($tableData[$groupid])) { |
84 | 84 | $groupData = &$tableData[$groupid]; |
@@ -52,7 +52,7 @@ | ||
52 | 52 | $sqlStrings[$tableName] = &$tableData; |
53 | 53 | } |
54 | 54 | |
55 | - if (strPos($tableName, 'item_extend') !== false) { | |
55 | + if (strPos($tableName, '_extend') !== false) { | |
56 | 56 | $groupid = $field->getFieldGroupId(); |
57 | 57 | if (isset($tableData[$groupid])) { |
58 | 58 | $groupData = &$tableData[$groupid]; |
@@ -409,7 +409,6 @@ | ||
409 | 409 | $configs['banners'] = $tmp['banners']; |
410 | 410 | $tmp =& $config_handler->getConfigsByDirname(XCUBE_CORE_USER_MODULE_NAME); |
411 | 411 | $configs['usercookie'] = $tmp['usercookie']; |
412 | - $configs['avatar_minposts'] = $tmp['avatar_minposts']; | |
413 | 412 | $configs['maxuname'] = $tmp['maxuname']; |
414 | 413 | $configs['sslloginlink'] = $tmp['sslloginlink']; |
415 | 414 | $configs['sslpost_name'] = $tmp['sslpost_name']; |
@@ -47,17 +47,17 @@ | ||
47 | 47 | $parameters = array(); |
48 | 48 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH'); |
49 | 49 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
50 | - } elseif ($field->getLen2() == '') { | |
50 | + } elseif ($field->getDecimalPlaces() == '') { | |
51 | 51 | $parameters = array(); |
52 | 52 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2'); |
53 | 53 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', '', $parameters); |
54 | - } elseif ($field->getLen2() < 0) { | |
54 | + } elseif ($field->getDecimalPlaces() < 0) { | |
55 | 55 | $parameters = array(); |
56 | 56 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DATA_LENGTH2'); |
57 | 57 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
58 | 58 | } else { |
59 | 59 | 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)) { | |
61 | 61 | $parameters = array(); |
62 | 62 | $parameters[] = constant('_AM_' . strtoupper($this->trustDirname) . '_LABEL_ITEMTYPE_DEFAULT_VALUE'); |
63 | 63 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_CHECK_INPUT_ERROR_MSG', '', $parameters); |
@@ -300,7 +300,7 @@ | ||
300 | 300 | $sqlStrings[$tableName] = &$tableData; |
301 | 301 | } |
302 | 302 | |
303 | - if (strPos($tableName, 'item_extend') !== false) { | |
303 | + if (strPos($tableName, '_extend') !== false) { | |
304 | 304 | $groupid = $field->getFieldGroupId(); |
305 | 305 | if (isset($tableData[$groupid])) { |
306 | 306 | $groupData = &$tableData[$groupid]; |
@@ -345,7 +345,7 @@ | ||
345 | 345 | $sqlStrings[$tableName] = &$tableData; |
346 | 346 | } |
347 | 347 | |
348 | - if (strPos($tableName, 'item_extend') !== false) { | |
348 | + if (strPos($tableName, '_extend') !== false) { | |
349 | 349 | $groupid = $field->getFieldGroupId(); |
350 | 350 | if (isset($tableData[$groupid])) { |
351 | 351 | $groupData = &$tableData[$groupid]; |
@@ -729,7 +729,7 @@ | ||
729 | 729 | |
730 | 730 | /** |
731 | 731 | * |
732 | - * must Create item_extend table | |
732 | + * must Create user_extend table | |
733 | 733 | * |
734 | 734 | * @param |
735 | 735 | * @return boolean |
@@ -21,15 +21,27 @@ | ||
21 | 21 | public function inputCheck(&$errors, $field, $value, $fieldName) { |
22 | 22 | //dataCheck |
23 | 23 | $field->getDataType()->inputCheck($errors, $field, $value, $fieldName); |
24 | + $myxoopsConfigUser = Xoonips_Utils::getXoopsConfigs(XOOPS_CONF_USER); | |
24 | 25 | $char = "/^[_a-z0-9\-+!#$%&'*\/=?^`{|}~]+(\.[_a-z0-9\-+!#$%&'*\/=?^`{|}~]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i"; |
25 | 26 | $parameters = array(); |
26 | 27 | $value = trim($value); |
28 | + $chk = true; | |
27 | 29 | if ($value != '') { |
28 | 30 | if (!preg_match($char, $value)) { |
29 | 31 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_INVALID_EMAIL', $fieldName, $parameters); |
32 | + $chk = false; | |
30 | 33 | } elseif ($this->mailIsExist($value)) { |
31 | 34 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_EMAILTAKEN', $fieldName, $parameters); |
32 | 35 | } |
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 | + | |
33 | 45 | } else { |
34 | 46 | $parameters[] = $field->getName(); |
35 | 47 | $errors->addError('_MD_' . strtoupper($this->trustDirname) . '_ERROR_REQUIRED', $fieldName, $parameters); |