已合并
!143 修复站点任务奖励用户组时清空用户原有用户组的问题

cxgreat2014:masterDiscuz!:master

cxgreat2014 创建于: 2018-02-01 18:59
  测试 1157835_comsenzdiscuz

$_G['forum_extgroupids']变量不存在,应为$_G['member']['extgroupids']。

0 条评论, 1 人参与

展开详细操作日志 收起操作日志
Discuz! 合并了 Pull Request 2018-02-04 21:05
Discuz! 测试通过 2018-02-04 21:04
Discuz! 指派了 测试人 Discuz! 2018-02-04 21:04

登录 后才可以发表评论

1 文件发生了变化, 影响行数: +7 -7
upload/source/class/class_task.php
@@ -589,19 +589,19 @@ class task {
global $_G;
 
$exists = FALSE;
- if($_G['forum_extgroupids']) {
- $_G['forum_extgroupids'] = explode("\t", $_G['forum_extgroupids']);
- if(in_array($gid, $_G['forum_extgroupids'])) {
+ if($_G['member']['extgroupids']) {
+ $_G['member']['extgroupids'] = explode("\t", $_G['member']['extgroupids']);
+ if(in_array($gid, $_G['member']['extgroupids'])) {
$exists = TRUE;
} else {
- $_G['forum_extgroupids'][] = $gid;
+ $_G['member']['extgroupids'][] = $gid;
}
- $_G['forum_extgroupids'] = implode("\t", $_G['forum_extgroupids']);
+ $_G['member']['extgroupids'] = implode("\t", $_G['member']['extgroupids']);
} else {
- $_G['forum_extgroupids'] = $gid;
+ $_G['member']['extgroupids'] = $gid;
}
 
- C::t('common_member')->update($_G['uid'], array('extgroupids' => $_G['forum_extgroupids']), 'UNBUFFERED');
+ C::t('common_member')->update($_G['uid'], array('extgroupids' => $_G['member']['extgroupids']), 'UNBUFFERED');
 
if($day) {
$memberfieldforum = C::t('common_member_field_forum')->fetch($_G['uid']);