Bug 5370: Fix all references to koha.org
[koha_fer] / misc / cronjobs / notifyMailsOp.pl
index 54811a0..630b159 100755 (executable)
@@ -1,4 +1,12 @@
+#!/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::Dates qw/format_date/;
 use Mail::Sendmail;  # comment out if not doing e-mail notices
@@ -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);