[Rt-commit] rt branch, 4.4/rescue-outlook-html, updated. rt-4.4.3-56-g20aac9475

Gergely Nagy algernon at bestpractical.com
Mon Oct 22 09:41:39 EDT 2018


The branch, 4.4/rescue-outlook-html has been updated
       via  20aac9475bfae38670910546b49717c3c7a6409f (commit)
      from  aa608d1380b2e444831e453620230267e04a36a6 (commit)

Summary of changes:
 lib/RT/EmailParser.pm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 20aac9475bfae38670910546b49717c3c7a6409f
Author: Gergely Nagy <algernon at bestpractical.com>
Date:   Mon Oct 22 15:39:27 2018 +0200

    Minor code cleanup in RT::EmailParser::RescueOutlook
    
    As the return value of 'RescueOutlook' is never checked, making sure we return a
    different value depending on whether the email was fixed up or not is not
    particularly useful. Instead of doing that, just return at the end.

diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index 285798cd8..3f8ad8ada 100644
--- a/lib/RT/EmailParser.pm
+++ b/lib/RT/EmailParser.pm
@@ -639,8 +639,6 @@ Similarly, if the message is HTML-only, the same problem is present there:
 between each paragraph, there will be an empty one in between with only a line
 break. This method removes those line break-only paragraphs too.
 
-return 1 if it does find the problem in the entity and get it fixed.
-
 =cut
 
 
@@ -683,8 +681,6 @@ sub RescueOutlook {
         $text_part = $mime;    # Assuming single part, already decoded.
     }
 
-    my $ret;
-
     if ($text_part) {
 
         # use the unencoded string
@@ -701,7 +697,6 @@ sub RescueOutlook {
                 $io->close;
                 $RT::Logger->debug(
                     "Removed extra newlines from MS Outlook message.");
-                $ret = 1;
             }
             else {
                 $RT::Logger->error("Can't write to body to fix newlines");
@@ -722,7 +717,6 @@ sub RescueOutlook {
                 $io->close;
                 $RT::Logger->debug(
                     "Removed extra newlines from MS Outlook message.");
-                $ret = 1;
             }
             else {
                 $RT::Logger->error("Can't write to body to fix newlines");
@@ -730,7 +724,7 @@ sub RescueOutlook {
         }
     }
 
-    return $ret;
+    return;
 }
 
 =head1 LooksLikeMSEmail

-----------------------------------------------------------------------


More information about the rt-commit mailing list