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

This commit is contained in:
Matthew Wilson 2005-05-12 21:37:06 +00:00
parent 462bca55b8
commit 789cd34522

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)." and postId=".quote($self->get("lastPostId"));
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;
}