我正在使用 tiki 版本 15.3 我设置了我的偏好,如果有一个我是编辑的新论坛主题,我将在“我的手表”中收到一封电子邮件通知。但是,我没有收到任何电子邮件。它适用于博客和新用户注册。因此,电子邮件设置没有问题。在调试代码时,我在代码中发现了一些问题: 在文件中:/lib/notification/notificationemaillib.php 行:112
$nots_raw = $tikilib->get_event_watches($event, $event == 'forum_post_topic'? $forum_info['forumId']: $threadId, $forum_info);
$threadId 应该是 $parentId 吗?由于 Tiki_user_Watch 表存储的是 Thread Parent Id,而不是新创建的 threadId。第二,
在第 122 行:
foreach ( $nots_raw as $n ) {
if ($n['user'] != $author
&& !in_array($n['user'], $users)) {
// make sure user receive only one notification even if he is monitoring both the topic and thread
$n['language'] = $tikilib->get_user_preference($n['user'], "language", $defaultLanguage);
$nots[] = $n;
$users[] = $n['user'];
}
这个 if 子句没有别的。我理解这种情况是当用户同时监控线程和主题时只发送一封电子邮件。但是,我只监控其中的 1 个,我认为应该有一个“
else{ $nots[] = $n;}
这样,$nots 将在代码的后面部分发送电子邮件。
if (count($nots)) {
include_once('lib/webmail/tikimaillib.php');
$smarty->assign('mail_forum', $forum_info["name"]);...
如果我错了,请指教。