[Cpan-forum-commit] rev 233 - in trunk: . lib/CPAN lib/CPAN/Forum/RM
svn at pti.co.il
svn at pti.co.il
Mon Jul 2 09:01:55 IDT 2007
Author: gabor
Date: 2007-07-02 09:01:55 +0300 (Mon, 02 Jul 2007)
New Revision: 233
Modified:
trunk/
trunk/lib/CPAN/Forum.pm
trunk/lib/CPAN/Forum/RM/Notify.pm
Log:
move the disable_email_notification check in the _sendmail sub
remove the additional lines in the notification messages
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4090
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
+ 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4091
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
Modified: trunk/lib/CPAN/Forum/RM/Notify.pm
===================================================================
--- trunk/lib/CPAN/Forum/RM/Notify.pm 2007-07-02 06:01:42 UTC (rev 232)
+++ trunk/lib/CPAN/Forum/RM/Notify.pm 2007-07-02 06:01:55 UTC (rev 233)
@@ -12,12 +12,6 @@
my ($self, $post_id) = @_;
my $post = CPAN::Forum::DB::Posts->retrieve($post_id);
- if ($self->config("disable_email_notification")) {
- warn "disabled";
- } else {
- warn "enabled";
- }
- return $self->config("disable_email_notification");
my $message =
$self->_text2mail ($post->text) .
Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm 2007-07-02 06:01:42 UTC (rev 232)
+++ trunk/lib/CPAN/Forum.pm 2007-07-02 06:01:55 UTC (rev 233)
@@ -7,7 +7,7 @@
use base 'CGI::Application';
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::LogDispatch;
-use Data::Dumper qw(Dumper);
+use Data::Dumper qw();
use POSIX qw(strftime);
use Mail::Sendmail qw(sendmail);
use CGI ();
@@ -1498,13 +1498,13 @@
my ($self, $it, $mail, $to, $uids) = @_;
while (my $s = $it->next) {
+ #$self->log->debug(Data::Dumper->Dump([$mail], ['mail']));
my $email = $s->uid->email;
- $self->log->debug("Sending to $email ?");
$mail->{To} = $email;
$self->log->debug("Processing uid: " . $s->uid->username) if $uids;
next if $uids and not $uids->{$s->uid->username};
$self->log->debug("Sending to $email id was found");
- next if $_[2]->{$email}++;
+ next if $_[3]->{$email}++; #TODO: stop using hardcoded reference to position!!!!!
$self->log->debug("Sending to $email first time sending");
$self->_my_sendmail(%$mail);
$self->log->debug("Sent to $email");
@@ -1570,9 +1570,12 @@
sub _my_sendmail {
my ($self, @args) = @_;
+ #$self->log->debug(Data::Dumper->Dump([\@args], ['_my_sendmail']));
return if $ENV{NO_CPAN_FORUM_MAIL};
# for testing
+ return if $self->config("disable_email_notification");
+
if (defined &_test_my_sendmail) {
$self->_test_my_sendmail(@_);
return;
More information about the Cpan-forum-commit
mailing list