帖子列表页标题是按主题号(tid)存储的, 而“首页标题”是按版块(forum)存储的, 所以没有被一同更新. 每个forum有一个fid号和一个最后回帖(lastpost), 最后回帖有一个标题.
在source/class/model/model_forum_post.php第68行开始的函数newreply 中, 从261行开始的6行
$lastpost = $this->thread['tid']."\t".$this->thread['subject']."\t".getglobal('timestamp')."\t".$author;
C::t('forum_forum')->update($this->forum['fid'], array('lastpost' => $lastpost));
C::t('forum_forum')->update_forum_counter($this->forum['fid'], 0, 1, 1);
if($this->forum['type'] == 'sub') {
C::t('forum_forum')->update($this->forum['fup'], array('lastpost' => $lastpost));
} 当新回帖时, 以上会更新每个版块(forum)的最后回复的主题(lastpost)的作者(author)、时间戳(timestamp)、标题(subject).
如果把这些代码加入到第333行开始的editpost 函数中, 就可以在编辑帖子之后也更新了吧. |