Allow a modified name to be passed from a renderer
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 12 Nov 2008 06:17:17 +0000 (23:17 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 12 Nov 2008 06:17:17 +0000 (23:17 -0700)
imp/lib/Contents.php

index 245c559..d78dc2b 100644 (file)
@@ -312,7 +312,9 @@ class IMP_Contents
         }
 
         $ret = $viewer->render($mode);
-        $ret['name'] = $mime_part->getName(true);
+        if (!isset($ret['name'])) {
+            $ret['name'] = $mime_part->getName(true);
+        }
 
         /* If this is a text/* part, AND the browser does not support UTF-8,
          * give the user a link to open the part in a new window with the