X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=misc%2Fcronjobs%2FnotifyMailsOp.pl;h=630b1591c3594852fb81ceac6cf5949edc8da4c8;hb=5e0b850d49f452ffbca41f47dc190d6d4f2323c7;hp=4b8c4a4ee65ab7df7d3cadc54d5dc0565ca66295;hpb=f8e9fb6445dadbdef91e13a253c9c6bcb75e0eec;p=koha.git diff --git a/misc/cronjobs/notifyMailsOp.pl b/misc/cronjobs/notifyMailsOp.pl index 4b8c4a4ee6..630b1591c3 100755 --- a/misc/cronjobs/notifyMailsOp.pl +++ b/misc/cronjobs/notifyMailsOp.pl @@ -1,9 +1,17 @@ +#!/usr/bin/perl use strict; +#use warnings; FIXME - Bug 2505 +BEGIN { + # find Koha's Perl modules + # test carefully before changing this + use FindBin; + eval { require "$FindBin::Bin/../kohalib.pl" }; +} use C4::Context; -use C4::Date; +use C4::Dates qw/format_date/; use Mail::Sendmail; # comment out if not doing e-mail notices use Getopt::Long; -use C4::Circulation::Circ2; +use C4::Circulation; # use C4::Members; # this module will notify only the mail case # Now it's only programmed for ouest provence, you can modify it for yourself @@ -41,8 +49,6 @@ sub GetBorrowerNotifys{ AND (notifys.borrowernumber=issues.borrowernumber AND notifys.itemnumber=issues.itemnumber) AND - issues.returndate IS NULL - AND notifys.borrowernumber=? AND notify_send_date IS NULL"); $sth2->execute($borrowernumber); @@ -204,7 +210,7 @@ foreach my $num (@getnofifys) { # now deal with the debarred mode # if ($debarred eq 1) { -# à ajouter : si le lecteur est en mode debarred, ajouter la fonction qui nous permettra cela +# �ajouter : si le lecteur est en mode debarred, ajouter la fonction qui nous permettra cela # UpdateBorrowerDebarred($num->{'borrowernumber'}); # } close(OUT);