New set of routines for HEAD.
[koha.git] / C4 / Suggestions.pm
index bf05e4e..351119c 100644 (file)
@@ -21,7 +21,6 @@ package C4::Suggestions;
 
 use strict;
 require Exporter;
-use DBI;
 use C4::Context;
 use C4::Output;
 use Mail::Sendmail;
@@ -382,6 +381,7 @@ sub ModStatus {
     $sth = $dbh->prepare($queryMail);
     $sth->execute($suggestionid);
     my $emailinfo = $sth->fetchrow_hashref;
+if ($emailinfo->{byemail}){
     my $template = gettemplate("suggestion/mail_suggestion_$status.tmpl","intranet");
 
     $template->param(
@@ -403,6 +403,7 @@ sub ModStatus {
     );
     sendmail(%mail);
 }
+}
 
 =head2 ConnectSuggestionAndBiblio