diff --git a/upload/source/function/function_home.php b/upload/source/function/function_home.php index feeb20e2da014fe2741e58a13312c7ba049dcc4d..0894806880716ffad2fe2a73d28ff7c2a012843c 100644 --- a/upload/source/function/function_home.php +++ b/upload/source/function/function_home.php @@ -575,6 +575,15 @@ function getfollowfeed($uid, $viewtype, $archiver = false, $start = 0, $perpage } } $list['threads'] = C::t('forum_thread')->fetch_all_by_tid(C::t('home_follow_feed')->get_tids()); + if (!empty($list['threads']) && is_array($list['threads'])) { + foreach ($list['threads'] as $key => $thread) { + if (empty($_G['setting']['followforumid']) || $thread['fid'] != $_G['setting']['followforumid']) { + if (!empty($list['content'][$key]['content'])) { + $list['content'][$key]['content'] = preg_replace('#onclick="changefeed\([^"]+\)"\s*style="cursor:\s*pointer;"#is', '', $list['content'][$key]['content']); + } + } + } + } } } return $list; diff --git a/upload/source/module/forum/forum_ajax.php b/upload/source/module/forum/forum_ajax.php index 0aa4f722699aff0a62cb3ae7f8b1e146b5277eec..94206930805b87a66a37e3cea9912ad08be8ec56 100644 --- a/upload/source/module/forum/forum_ajax.php +++ b/upload/source/module/forum/forum_ajax.php @@ -620,18 +620,18 @@ EOF; $feed = $thread = array(); if($tid) { $thread = C::t('forum_thread')->fetch($tid); + if(empty($_G['setting']['followforumid']) || $thread['fid'] != $_G['setting']['followforumid']) { + $flag = 0; + } if($flag) { $post = C::t('forum_post')->fetch($thread['posttableid'], $pid); - if($_G['uid'] != $post['authorid']) { + if($thread['tid'] != $post['tid']) { showmessage('quickclear_noperm'); } require_once libfile('function/discuzcode'); require_once libfile('function/followcode'); $post['message'] = followcode($post['message'], $tid, $pid); } else { - if($_G['uid'] != $thread['authorid']) { - showmessage('quickclear_noperm'); - } if(!isset($_G['cache']['forums'])) { loadcache('forums'); }