- fix [ 1182630 ] thread::isMarkedRead should check thread's lastpost,not self

This commit is contained in:
Matthew Wilson 2005-05-12 21:35:33 +00:00
parent 97010b178c
commit 462bca55b8

View file

@ -380,7 +380,7 @@ Returns a boolean indicating whether this thread is marked read for the user.
sub isMarkedRead {
my $self = shift;
return 1 if $self->isPoster;
my ($isRead) = WebGUI::SQL->quickArray("select count(*) from Post_read where userId=".quote($session{user}{userId})." and threadId=".quote($self->getId));
my ($isRead) = WebGUI::SQL->quickArray("select count(*) from Post_read where userId=".quote($session{user}{userId})." and threadId=".quote($self->getId)." and postId=".quote($self->get("lastPostId"));
return $isRead;
}