diff options
author | gerv%gerv.net <> | 2002-08-20 04:17:18 +0000 |
---|---|---|
committer | gerv%gerv.net <> | 2002-08-20 04:17:18 +0000 |
commit | 9c0a26d3a5a35788694f5f284c69b995a3298c86 (patch) | |
tree | 15cc4cfb1e5e9fb7bcc3898530776f44c7b52492 /processmail | |
parent | e6fff23fcd99b09511b62c4db4eca658fe5257c4 (diff) | |
download | bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.gz bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.bz2 bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.xz bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.zip |
Bug 143286 - Add support for Insiders, Private comments, Private Attachments. Patch by bugreport@peshkin.net; r=gerv.
Diffstat (limited to 'processmail')
-rwxr-xr-x | processmail | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/processmail b/processmail index 20833a4f4..8d4dc4b69 100755 --- a/processmail +++ b/processmail @@ -225,7 +225,7 @@ sub ProcessOneBug { } - my $newcomments = GetLongDescriptionAsText($id, $start, $end); + my ($newcomments, $anyprivate) = GetLongDescriptionAsText($id, $start, $end); # # Start of email filtering code @@ -303,7 +303,8 @@ sub ProcessOneBug { \@reasons, \%values, \%defmailhead, \%fielddescription, $difftext, - $newcomments, $start, $id, + $newcomments, $anyprivate, + $start, $id, \@depbugs))) { @@ -612,9 +613,9 @@ sub filterEmailGroup ($$$) { return @recipients; } -sub NewProcessOnePerson ($$$$$$$$$$$$) { +sub NewProcessOnePerson ($$$$$$$$$$$$$) { my ($person, $count, $hlRef, $reasonsRef, $valueRef, $dmhRef, $fdRef, $difftext, - $newcomments, $start, $id, $depbugsRef) = @_; + $newcomments, $anyprivate, $start, $id, $depbugsRef) = @_; my %values = %$valueRef; my @headerlist = @$hlRef; @@ -650,7 +651,19 @@ sub NewProcessOnePerson ($$$$$$$$$$$$) { # quietly disappear from their radar. # return unless CanSeeBug($id, $userid, $groupset); - + + # Drop any non-insiders if the comment is private + if (Param("insidergroup") && ($anyprivate != 0)) { + ConnectToDatabase(); + PushGlobalSQLState(); + SendSQL("select (bit & $groupset ) != 0 from groups where name = " . SqlQuote(Param("insidergroup"))); + my $bit = FetchOneColumn(); + PopGlobalSQLState(); + if (!$bit) { + return; + } + } + # We shouldn't send changedmail if this is a dependency mail, and any of # the depending bugs is not visible to the user. foreach my $dep_id (@depbugs) { |