- Timestamp:
- 10/17/09 11:44:14 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x00/MailerContrib/lib/Foswiki/Contrib/MailerContrib.pm
r5269 r5288 27 27 28 28 our $VERSION = '$Rev$'; 29 our $RELEASE = '1 5Oct 2009';29 our $RELEASE = '17 Oct 2009'; 30 30 our $SHORTDESCRIPTION = 'Supports e-mail notification of changes'; 31 31 32 32 our $verbose = 0; 33 our $nonews = 0; 34 our $nochanges = 0; 33 35 34 36 # PROTECTED STATIC ensure the contrib is initernally initialised … … 40 42 =pod 41 43 42 ---++ StaticMethod mailNotify($webs, $session, $verbose, $exwebs )44 ---++ StaticMethod mailNotify($webs, $session, $verbose, $exwebs, $nonewsmode, $nochangesmode) 43 45 * =$webs= - filter list of names webs to process. Wildcards (*) may be used. 44 46 * =$session= - optional session object. If not given, will use a local object. 45 47 * =$verbose= - true to get verbose (debug) output. 46 48 * =$exwebs = - filter list of webs to exclude. 49 * =$nonewsmode = the notify script was called with the -nonews option so we skip news mode 50 * =$nochangesmode = the notify script was called with the -nochanges option 47 51 48 52 Main entry point. … … 55 59 56 60 sub mailNotify { 57 my ( $webs, $twiki, $noisy, $exwebs ) = @_;61 my ( $webs, $twiki, $noisy, $exwebs, $nonewsmode, $nochangesmode ) = @_; 58 62 59 63 $verbose = $noisy; 64 $nonews = $nonewsmode || 0; 65 $nochanges = $nochangesmode || 0; 60 66 61 67 my $webstr; … … 208 214 # PRIVATE: Read the webnotify, and notify changes 209 215 sub _processWeb { 210 my ( $twiki, $web ) = @_;216 my ( $twiki, $web, $nonews, $nochanges ) = @_; 211 217 212 218 if ( !Foswiki::Func::webExists($web) ) { … … 315 321 316 322 # Now generate emails for each recipient 317 my $report = 318 _sendChangesMails( $twiki, $web, \%changeset, 319 Foswiki::Time::formatTime($timeOfLastNotify) ); 320 321 $report .= _sendNewsletterMails( $twiki, $web, \%allSet ); 322 323 my $report = ''; 324 325 if ( !$nochanges ) { 326 $report .= _sendChangesMails( $twiki, $web, \%changeset, 327 Foswiki::Time::formatTime($timeOfLastNotify) ); 328 } 329 330 if ( !$nonews ) { 331 $report .= _sendNewsletterMails( $twiki, $web, \%allSet ); 332 } 333 323 334 if ( $timeOfLastChange != 0 ) { 324 335 if ( open( F, '>', $notmeta ) ) {
Note: See TracChangeset
for help on using the changeset viewer.
