Fixed a bug which would cause the query to return inbox messages to fail if the user wasn't a member of any groups.

This commit is contained in:
Frank Dillon 2008-11-17 05:13:33 +00:00
parent 96627227c6
commit 0e42cdecfc

View file

@ -456,6 +456,7 @@ sub getMessageSql {
my $limitHalf = $messageLimit / 2;
my $limitQuarter = $messageLimit / 4;
my $userGroups = $session->db->quoteAndJoin( $user->getGroupIdsRecursive );
$userGroups = "''" if $userGroups eq "";
# for performance purposes don't use datasets larger than 20000 no matter how man messages are in the inbox
my $sql = qq{