- Timestamp:
- 01/24/12 21:16:27 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ImmediateNotifyPlugin/lib/Foswiki/Plugins/ImmediateNotifyPlugin.pm
r13777 r13817 23 23 my %methodHandlers; # Loaded handlers 24 24 my %methodAllowed; # Methods permitted by config. 25 26 =begin TML27 28 ---+ debug ( $message )29 30 Write debug messages if debug is enabled.31 32 =cut33 25 34 26 =begin TML … … 81 73 next if ( $method eq "Module" ); 82 74 next if ( $method eq "Enabled" ); 83 next if ( $method eq "Bitly" ); 75 next if ( $method eq "Bitly" ); # Bitly is not a notifier plugin 84 76 if ( $Foswiki::cfg{Plugins}{ImmediateNotifyPlugin}{$method}{Enabled} ) { 85 77 debug("Allowing method $method"); … … 183 175 184 176 debug("- ImmediateNotifyPlugin: Processing name $name"); 185 return if exists $users->{$name}; # Already saw this name - skip it. 177 return 178 if ( exists $users->{$name} || exists $groups->{name} ) 179 ; # Already saw this name - skip it. 186 180 187 181 if ( Foswiki::Func::isGroup($name) ) { 188 return if exists $groups->{$name}; # don't reprocess groups189 182 $groups->{$name} = $name; 190 183 … … 216 209 my ( $method, $parms ) = 217 210 $methodString =~ m/^(.*?)(?:\((.*?)\))?$/; 218 $parms |= '';211 $parms |= ''; 219 212 debug( 220 213 "- ImmediateNotifyPlugin: processName: User $name found method ($method) parms ($parms) " 221 214 ); 222 215 $users->{$name}{METHOD} = $method || 'SMTP'; 223 $users->{$name}{PARMS} = $parms || '';216 $users->{$name}{PARMS} = $parms; 224 217 } 225 218 else { … … 238 231 } 239 232 240 241 233 =begin TML 242 234 … … 250 242 my ( $text, $topic, $web, $meta ) = @_; 251 243 252 unless ( Foswiki::Func::topicExists( $web, $topic) ) {253 Foswiki::Func::getContext()->{'NewTopic'} = 1;244 unless ( Foswiki::Func::topicExists( $web, $topic ) ) { 245 Foswiki::Func::getContext()->{'NewTopic'} = 1; 254 246 } 255 247 } … … 274 266 # This handler is called by Foswiki::Store::saveTopic just after the save action. 275 267 276 debug("- ImmediateNotifyPlugin::afterSaveHandler( $ _[2].$_[1])");268 debug("- ImmediateNotifyPlugin::afterSaveHandler( $web.$topic )"); 277 269 278 270 if ($error) { … … 285 277 # in Item9563 or changes made in the save will be missed. 286 278 287 my $testSet = $topicObject->getPreference('IMMEDIATENOTIFY');288 debug("- ImmediateNotifyPlugin: getPreference returned $testSet \n")289 if $testSet;290 291 279 my @names; 292 293 # NOTE: in this case we DO want to use the Meta::getPreference() function. If the normal294 # preferences API is used, settings are cached and don't reflect changes just saved in this295 # transaction. The Meta function uses the raw topic data and not the cached settings.296 280 297 281 # Check if the topic contains an IMMEDIATENOTIFY setting and extract names if present … … 379 363 Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 380 364 381 Copyright (C) 2008-201 1Foswiki Contributors. Foswiki Contributors365 Copyright (C) 2008-2012 Foswiki Contributors. Foswiki Contributors 382 366 are listed in the AUTHORS file in the root of this distribution. 383 367 384 Copyright (C) 2010-2011 George Clark385 368 Copyright (C) 2003 Walter Mundt, emage@spamcop.net 386 369 Copyright (C) 2003 Akkaya Consulting GmbH, jpabel@akkaya.de
Note: See TracChangeset
for help on using the changeset viewer.
