Use default name if none exists.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 17 Dec 2008 05:19:00 +0000 (22:19 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 17 Dec 2008 05:19:00 +0000 (22:19 -0700)
imp/view.php

index 9e3db88..13f8479 100644 (file)
@@ -91,7 +91,11 @@ case 'download_all':
     $tosave = array();
     foreach (unserialize(Util::getFormData('download_ids')) as $val) {
         $mime = $contents->getMIMEPart($val);
-        $tosave[] = array('data' => $mime->getContents(), 'name' => $mime->getName(true));
+        $name = $mime->getName(true);
+        if (!$name) {
+            $name = sprintf(_("part %s"), $val);
+        }
+        $tosave[] = array('data' => $mime->getContents(), 'name' => $name);
     }
 
     $horde_compress = &Horde_Compress::singleton('zip');