Bug 12344: QA followup: use next instead of return
authorBenjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Thu, 5 Mar 2015 11:18:09 +0000 (12:18 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 30 Mar 2015 16:38:35 +0000 (13:38 -0300)
Use next instead of return when generating templates.
In case patron has enabled a message type that misses a template,
next message type will be attempted instead of returning at once.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Circulation.pm

index 1cc7c5b..02c799a 100644 (file)
@@ -3274,7 +3274,7 @@ sub SendCirculationAlert {
                     'borrowers'   => $borrower,
                     'branches'    => $branch,
                 }
-            ) or return;
+            ) or next;
             C4::Message->enqueue($letter, $borrower, $_);
         } else {
             #warn "append to old message";
@@ -3291,7 +3291,7 @@ sub SendCirculationAlert {
                     'borrowers'   => $borrower,
                     'branches'    => $branch,
                 }
-            ) or return;
+            ) or next;
             $message->append($letter);
             $message->update;
         }