Add a 'ids' output to render().
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 11 Nov 2008 05:44:21 +0000 (22:44 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 11 Nov 2008 05:44:21 +0000 (22:44 -0700)
This parameter indicates the list of MIME IDs that this viewer's render
output was responsible for.

framework/Mime/lib/Horde/Mime/Viewer/Driver.php

index 672b729..a16de45 100644 (file)
@@ -99,6 +99,9 @@ class Horde_Mime_Viewer_Driver
      * @return array  An array with the following elements:
      * <pre>
      * 'data' - (string) The rendered data.
+     * 'ids' - (array) The list of MIME IDs that the rendered data covers
+     *         (e.g. for multipart parts, the base multipart object may
+     *         render all the data needed to display all the subparts)
      * 'status' - (array) An array of status information to be displayed to
      *            the user.  Consists of arrays with the following keys:
      *            'position' - (string) Either 'top' or 'bottom'
@@ -119,6 +122,8 @@ class Horde_Mime_Viewer_Driver
             return $default;
         }
 
+        $default['ids'] = array($this->_mimepart->getMIMEId());
+
         switch ($mode) {
         case 'full':
             $ret = $this->_render();