[Koha-cvs] CVS: koha/C4 Suggestions.pm,1.4,1.4.2.1

Paul POULAIN tipaul at users.sourceforge.net
Fri Mar 18 10:37:59 CET 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32321/C4

Modified Files:
      Tag: rel_2_2
	Suggestions.pm 
Log Message:
Fixing a bug in suggestions : the mail was not sent.

Index: Suggestions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Suggestions.pm,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** Suggestions.pm	13 Sep 2004 15:25:38 -0000	1.4
--- Suggestions.pm	18 Mar 2005 09:37:56 -0000	1.4.2.1
***************
*** 25,28 ****
--- 25,29 ----
  use C4::Context;
  use C4::Output;
+ use Mail::Sendmail;
  # use C4::Interface::CGI::Output;
  use vars qw($VERSION @ISA @EXPORT);
***************
*** 109,114 ****
  	}
  	if ($suggestedbyme) {
! 		push @sql_params,$user;
! 		$query .= " and suggestedby=?";
  	} else {
  		$query .= " and managedby is NULL";
--- 110,118 ----
  	}
  	if ($suggestedbyme) {
! 		if ($suggestedbyme eq -1) {
! 		} else {
! 			push @sql_params,$user;
! 			$query .= " and suggestedby=?";
! 		}
  	} else {
  		$query .= " and managedby is NULL";
***************
*** 201,205 ****
  					bysurname => $emailinfo->{bysurname},
  					);
! 	warn "mailing => ".$template->output;
  # 	warn "sending email to $emailinfo->{byemail} from $emailinfo->{libemail} to notice new status $emailinfo->{status} for $emailinfo->{title} / $emailinfo->{author}";
  }
--- 205,214 ----
  					bysurname => $emailinfo->{bysurname},
  					);
! 	my %mail = ( To => $emailinfo->{byemail},
! 				 From => $emailinfo->{libemail},
! 				 Subject => 'Koha suggestion',
! 				 Message => "".$template->output
! 				 );
! sendmail(%mail);
  # 	warn "sending email to $emailinfo->{byemail} from $emailinfo->{libemail} to notice new status $emailinfo->{status} for $emailinfo->{title} / $emailinfo->{author}";
  }





More information about the Koha-cvs mailing list