Fix numbering of message/rfc822 at root of message.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 21 Nov 2008 05:53:42 +0000 (22:53 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 21 Nov 2008 05:53:42 +0000 (22:53 -0700)
framework/Mime/lib/Horde/Mime/Part.php

index cf65539..e7d2ac4 100644 (file)
@@ -1267,7 +1267,12 @@ class Horde_Mime_Part
             if (empty($this->_parts)) {
                 $this->setMimeId($id . '1');
             } else {
-                $this->setMimeId($id . '0');
+                if (empty($id) && ($this->getType() == 'message/rfc822')) {
+                    $this->setMimeId('1');
+                    $id = '1.';
+                } else {
+                    $this->setMimeId($id . '0');
+                }
                 $i = 1;
                 foreach (array_keys($this->_parts) as $val) {
                     $this->_parts[$val]->buildMimeIds($id . $i++);