Changeset 5821
- Timestamp:
- 12/18/09 11:14:24 (2 years ago)
- Location:
- trunk/MailerContrib
- Files:
-
- 1 added
- 4 edited
-
data/System/MailerContrib.txt (modified) (1 diff)
-
lib/Foswiki/Contrib/MailerContrib.pm (modified) (2 diffs)
-
lib/Foswiki/Contrib/MailerContrib/Config.spec (modified) (1 diff)
-
lib/Foswiki/Contrib/MailerContrib/MANIFEST (modified) (1 diff)
-
lib/Foswiki/Contrib/MailerContribPlugin.pm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/MailerContrib/data/System/MailerContrib.txt
r5752 r5821 250 250 | Release: | %$RELEASE% | 251 251 | Change History: | | 252 | 18 Dec 2009 | Foswikitask:Item2511: make a new tiny plugin module, to reduce load time for when the mailer isn't used in a request | 252 253 | 8 Dec 2009 | Foswikitask:Item8316: Added REST handler, Foswikitask:Item2473: Foswikitask:Item2480: doc & dead code tidy-ups | 253 254 | 4 Dec 2009 | Foswikitask:Item8354: Martin Rowe fixed a problem with STARTPUBLISH in newsletters corrupting the template | -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib.pm
r5752 r5821 27 27 28 28 our $VERSION = '$Rev$'; 29 our $RELEASE = ' 8 Dec 2009';29 our $RELEASE = '18 Dec 2009'; 30 30 our $SHORTDESCRIPTION = 'Supports e-mail notification of changes'; 31 31 … … 38 38 $Foswiki::cfg{MailerContrib}{EmailFilterIn} ||= 39 39 $Foswiki::regex{emailAddrRegex}; 40 }41 42 # Plugin init method, used to initialise handlers43 sub initPlugin {44 Foswiki::Func::registerRESTHandler('notify', \&_restNotify);45 return 1;46 }47 48 # Run mailnotify using a rest handler49 sub _restNotify {50 my ( $session, $plugin, $verb, $response ) = @_;51 52 if (!Foswiki::Func::isAnAdmin()) {53 $response->header( -status => 403, -type => 'text/plain' );54 $response->print("Only administrators can do that");55 } else {56 # Don't use the $response; we want to see things happening57 local $| = 1; # autoflush on58 require CGI;59 print CGI::header( -status => 200, -type => 'text/plain' );60 my $query = Foswiki::Func::getCgiQuery();61 my $nonews = $query->param('nonews');62 my $nochanges = $query->param('nochanges');63 my @exwebs = split(',', $query->param('excludewebs') || '');64 my @webs = split(',', $query->param('webs') || '');65 $verbose = 1; # watchen das blinken lights66 mailNotify( \@webs, $verbose, \@exwebs, $nonews, $nochanges );67 }68 return undef;69 40 } 70 41 -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Config.spec
r5752 r5821 13 13 # **STRING EXPERT** 14 14 # Plugin module path for handler registration 15 $Foswiki::cfg{Plugins}{MailerContrib }{Module} = 'Foswiki::Contrib::MailerContrib';15 $Foswiki::cfg{Plugins}{MailerContribPlugin}{Module} = 'Foswiki::Contrib::MailerContribPlugin'; 16 16 # **BOOLEAN** 17 17 # Enable plugin module for handler registration. You can disable the plugin 18 18 # if you don't want to invoke mail notification from the web. 19 $Foswiki::cfg{Plugins}{MailerContrib }{Enabled} = 1;19 $Foswiki::cfg{Plugins}{MailerContribPlugin}{Enabled} = 1; -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/MANIFEST
r5752 r5821 7 7 lib/Foswiki/Contrib/MailerContrib/UpData.pm 0444 8 8 lib/Foswiki/Contrib/MailerContrib.pm 0444 9 lib/Foswiki/Contrib/MailerContribPlugin.pm 0444 9 10 data/System/MailerContrib.txt 0644 10 11 tools/mailnotify 0555
Note: See TracChangeset
for help on using the changeset viewer.
