I think there is a bug with the way the link_comments field is updated in the links table. I have several stories where the comment count has been reset when a comment has been added (example - 2 comments already there, 3rd added, count now at 1).
This is will pligg b9.5, shared host running on linux.
The update seems to happen in libs/comment.php, at the line $link->adjust_comment(1). For now (after a couple of attempts) I've let it re-calculate the comment count everytime a new comment is posted:
Code:$comment_count = $db->get_var("SELECT count(*) FROM " . table_comments . " WHERE comment_link_id='$comment_link'"); $sql = "UPDATE " . table_links . " SET link_comments='$comment_count' WHERE link_id='$comment_link'"; $db->query($sql);



Reply With Quote



