久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

主題分類數量統計在刪帖后不更新

2173 4 0提示:支持鍵盤翻頁<-左 右-> zamapara 發表于 2022-1-17 17:35 帖子模式

本帖最后由 zamapara 于 2022-1-18 08:56 編輯 過程: 1. 新建 分類1 2. 分類1 下發帖,點分類1,數量更新為 1 (正確的) 3. 刪除這個帖子, 再選中分類1,數量還是顯示為1,是錯誤的,正確的應該是0 經檢查, ... 查看全文

    組圖打開中,請稍候......

評論4個評論

zamapara發表于  2022-1-29 17:03:42
老周部落 發表于 2022-1-29 16:44
試試 https://gitee.com/laozhoubuluo/DiscuzX/commits/fix/v3.4/threadclasscount_0 補丁能否解決? ...

已測試,可以解決
老周部落發表于  2022-1-29 16:44:34
zamapara發表于  2022-1-18 08:56:18
哈哈,昨天沒仔細看,你說的對
dashen發表于  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;
                }
        }

}


你好,這個位置我想要一個分類目錄的,帶二級目錄。簡單分類處理不了復雜信息。求解謝謝! 
發表于 2022-3-22 14:04
  • 關注公眾號
  • 有償服務微信
  • 有償服務QQ

手機版|小黑屋|Discuz! 官方交流社區 ( 皖ICP備16010102號 |皖公網安備34010302002376號 )|網站地圖|star

GMT+8, 2025-7-3 23:07 , Processed in 0.054649 second(s), 16 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

關燈 在本版發帖
有償服務QQ
有償服務微信
返回頂部
快速回復 返回頂部 返回列表