Committer: azateev
LJSUP-13313 Remove community invites limit for user livejournalU trunk/cgi-bin/communitylib.pl
Modified: trunk/cgi-bin/communitylib.pl =================================================================== --- trunk/cgi-bin/communitylib.pl 2012-08-15 13:54:10 UTC (rev 22660) +++ trunk/cgi-bin/communitylib.pl 2012-08-15 14:19:19 UTC (rev 22661) @@ -285,8 +285,11 @@ my $argstr = $dbcr->selectrow_array('SELECT args FROM inviterecv WHERE userid = ? AND commid = ?', undef, $u->{userid}, $cu->{userid}); - # step 4: exceeded outstanding invitation limit? only if no outstanding invite - unless ($argstr) { + # step 4: exceeded outstanding invitation limit? + # should be checked when + # - there is no outstanding invite for this user AND + # - maintainer has no unlimited invites ability + if (!$argstr && !$LJ::UNLIMITED_INVITES_TO_COMMUNITIES{ $mu->user }) { my $cdbcr = LJ::get_cluster_def_reader($cu); return LJ::error('db') unless $cdbcr; my $count = $cdbcr->selectrow_array("SELECT COUNT(*) FROM invitesent WHERE commid = ? " .