Sorry, copy paste didn't workout as it should.
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 2 Nov 2005 22:26:24 +0000 (22:26 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 2 Nov 2005 22:26:24 +0000 (22:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10235 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index f2b5a4b4f22dd3283f3d7b3a943b3f403147ce42..854f03f86135667ff448140836ea095b3a3e3cf9 100644 (file)
@@ -1672,13 +1672,13 @@ function deliverMessage($composeMessage, $draft=false) {
             $aMailbox = sqm_api_mailbox_select($imap_stream, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
             //sqimap_mailbox_select ($imap_stream, $mailbox);
             $aUpdatedMsgs = sqimap_toggle_flag($imap_stream, array($passed_id), '\\Answered', true, false);
             $aMailbox = sqm_api_mailbox_select($imap_stream, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
             //sqimap_mailbox_select ($imap_stream, $mailbox);
             $aUpdatedMsgs = sqimap_toggle_flag($imap_stream, array($passed_id), '\\Answered', true, false);
-             if (isset($aUpdatedMsgs[$iUid]['FLAGS'])) {
+             if (isset($aUpdatedMsgs[$passed_id]['FLAGS'])) {
                 /**
                  * Only update the cached headers if the header is
                  * cached.
                  */
                 /**
                  * Only update the cached headers if the header is
                  * cached.
                  */
-                if (isset($aMailbox['MSG_HEADERS'][$iUid])) {
-                    $aMailbox['MSG_HEADERS'][$iUid]['FLAGS'] = $aMsg['FLAGS'];
+                if (isset($aMailbox['MSG_HEADERS'][$passed_id])) {
+                    $aMailbox['MSG_HEADERS'][$passed_id]['FLAGS'] = $aMsg['FLAGS'];
                 }
             }
         }
                 }
             }
         }