Bug 21874: (QA follow-up) Fix intranet sendshelf
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 23 Nov 2018 11:02:51 +0000 (12:02 +0100)
committerJesse Maseto <jesse@bywatersolution.com>
Tue, 18 Dec 2018 13:47:48 +0000 (13:47 +0000)
Move encode line below regex line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1ec452e5ce454b99433972a34ec1154e81a19a3)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

virtualshelves/sendshelf.pl

index 08a3ac1..3c077ef 100755 (executable)
@@ -113,10 +113,11 @@ if ($email) {
 
     # Analysing information and getting mail properties
     if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) {
-        $mail{'subject'} = encode('MIME-Header', $1);
+        $mail{subject} = $1;
         $mail{subject} =~ s|\n?(.*)\n?|$1|;
     }
     else { $mail{'subject'} = "no subject"; }
+    $mail{subject} = encode( 'MIME-Header', $mail{subject} );
 
     my $email_header = "";
     if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {