view.php: index -> uid
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 4 Mar 2009 18:16:53 +0000 (11:16 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 4 Mar 2009 18:17:09 +0000 (11:17 -0700)
imp/js/src/DimpCore.js
imp/lib/Contents.php
imp/view.php

index 744933d..c965e57 100644 (file)
@@ -475,7 +475,7 @@ DimpCore = {
                 return;
 
             case 'msg_view_source':
-                this.popupWindow(this.addURLParam(DIMP.conf.URI_VIEW, { index: DIMP.conf.msg_index, mailbox: DIMP.conf.msg_folder, actionID: 'view_source', id: 0 }, true), DIMP.conf.msg_index + '|' + DIMP.conf.msg_folder);
+                this.popupWindow(this.addURLParam(DIMP.conf.URI_VIEW, { uid: DIMP.conf.msg_index, mailbox: DIMP.conf.msg_folder, actionID: 'view_source', id: 0 }, true), DIMP.conf.msg_index + '|' + DIMP.conf.msg_folder);
                 break;
 
             case 'alertsloglink':
index a55adc7..000fcf6 100644 (file)
@@ -646,7 +646,7 @@ class IMP_Contents
         ));
 
         if (!is_null($this->_mailbox)) {
-            $params['index'] = $this->_index;
+            $params['uid'] = $this->_index;
             $params['mailbox'] = $this->_mailbox;
         }
 
index cfaf9fd..27f8bea 100644 (file)
  * 'ctype' - (string) The content-type to use instead of the content-type
  *           found in the original Horde_Mime_Part object.
  * 'id' - (string) The MIME part ID to display.
- * 'index - (integer) The index of the message.
  * 'mailbox' - (string) The mailbox of the message.
  * 'mode' - (integer) The view mode to use.
  *          DEFAULT: IMP_Contents::RENDER_FULL
+ * 'uid - (string) The UID of the message.
  * 'zip' - (boolean) Download in .zip format?
  * </pre>
  *
@@ -64,14 +64,14 @@ if ($actionID == 'compose_attach_preview') {
     $actionID = 'view_attach';
     $id = $mime->getMimeId();
 } else {
-    $index = Util::getFormData('index');
+    $uid = Util::getFormData('uid');
     $mailbox = Util::getFormData('mailbox');
-    if (!$index || !$mailbox) {
+    if (!$uid || !$mailbox) {
         exit;
     }
 
     try {
-        $contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
+        $contents = &IMP_Contents::singleton($uid . IMP::IDX_SEP . $mailbox);
     } catch (Horde_Exception $e) {
         Horde::fatal($e, __FILE__, __LINE__);
     }