|
发表于 2022-1-17 20:37:52
|
查看全部
$threadclasscount是个数组,并不是记录的帖子0
实际是 $_G['forum_threadcount'] 为 0 ,导致无法进入更新流程
function threadclasscount($fid, $id = 0, $idtype = '', $count = 0) {
if(!$fid) {
return false;
}
$typeflag = ($id && $idtype && in_array($idtype, array('typeid', 'sortid')));
$threadclasscount = C::t('common_cache')->fetch('threadclasscount_'.$fid);
$threadclasscount = dunserialize($threadclasscount['cachevalue']);
if($count) {
if($typeflag) {
$threadclasscount[$idtype][$id] = $count;
C::t('common_cache')->insert(array(
'cachekey' => 'threadclasscount_'.$fid,
'cachevalue' => serialize($threadclasscount),
), false, true);
return true;
} else {
return false;
}
} else {
if($typeflag) {
return $threadclasscount[$idtype][$id];
} else {
return $threadclasscount;
}
}
}
|
|