serendipity_db_query($query);
if ($serendipity['allowSubscriptions']) {
- serendipity_mailSubscribers($entry_id, $rs['author'], $rs['email'], $rs['title'], $rs['authoremail']);
+ serendipity_mailSubscribers($entry_id, $rs['author'], $rs['email'], $rs['title'], $rs['authoremail'], $cid);
}
return true;
}
}
}
-function serendipity_mailSubscribers($entry_id, $poster, $posterMail, $title, $fromEmail = 'none@example.com') {
+function serendipity_mailSubscribers($entry_id, $poster, $posterMail, $title, $fromEmail = 'none@example.com', $cid = null) {
global $serendipity;
- $entryURI = serendipity_archiveURL($entry_id, $title, 'baseURL');
+ $entryURI = serendipity_archiveURL($entry_id, $title, 'baseURL') . ($cid > 0 ? '#' . $cid : '');
$subject = sprintf(NEW_COMMENT_TO_SUBSCRIBED_ENTRY, $title);
$pgsql_insert = '';