a couple little tweaks

This commit is contained in:
JT Smith 2003-10-07 04:16:10 +00:00
parent 5477108b9b
commit 45788efd32
3 changed files with 14 additions and 8 deletions

View file

@ -58,6 +58,7 @@ sub getThread {
sub hasRated {
my ($self, $userId, $ipAddress) = @_;
$userId = $session{user}{userId} unless ($userId);
return 1 if ($userId != 1 && $userId == $self->get("userId")); # is poster
$ipAddress = $session{env}{REMOTE_ADDR} unless ($ipAddress);
my ($flag) = WebGUI::SQL->quickArray("select count(*) from forumPostRating where forumPostId="
.$self->get("forumPostId")." and ((userId=$userId and userId<>1) or (userId=1 and