Bug 9016: (follow-up) FIX letter name is not displayed on editing a letter
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 27 Mar 2014 15:00:57 +0000 (16:00 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 20:29:18 +0000 (20:29 +0000)
If the name is not in email, the name is not correctly retrieved.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
tools/letter.pl

index 30ce3d2..789efcc 100755 (executable)
@@ -176,7 +176,7 @@ sub add_form {
         # So we can only sent the first one to the template.
         for my $mtt ( @$message_transport_types ) {
             # The letter_name
-            if ( $first_flag ) {
+            if ( $first_flag and $letters->{$mtt}{name} ) {
                 $template->param(
                     letter_name=> $letters->{$mtt}{name},
                 );