6.0.0-alpha14
7/1/25

[#11724] typos (lots) in preview
Summary typos (lots) in preview
Queue IMP
Queue Version 6.0.1
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester viktor (at) szepe (dot) net
Created 11/19/2012 (4607 days ago)
Due
Updated 11/19/2012 (4607 days ago)
Assigned 11/19/2012 (4607 days ago)
Resolved 11/19/2012 (4607 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
11/19/2012 11:51:25 PM Michael Slusarz Comment #7
Assigned to Michael Slusarz
State ⇒ Resolved
Priority ⇒ 1. Low
Reply to this comment
$v is correctly used since it contains the UID of the message.
here $v comes from the foreach, later on it becomes a huge array:
Yes, this was the issue, not the logic.
11/19/2012 11:51:00 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit fd9905ba596c00c5992b23026933b5cec69b285f
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Nov 19 16:50:47 2012 -0700

     [mms] Fix preview message text in basic view (Bug #11724).

  imp/docs/CHANGES         |    1 +
  imp/lib/Mailbox/List.php |   25 ++++++++++++++++---------
  imp/package.xml          |    2 ++
  3 files changed, 19 insertions(+), 9 deletions(-)

http://git.horde.org/horde-git/-/commit/fd9905ba596c00c5992b23026933b5cec69b285f
11/19/2012 10:58:08 PM viktor (at) szepe (dot) net Comment #5 Reply to this comment
$v is correctly used since it contains the UID of the message.
Yes, if I separate the two "$v"-s, it works OK.
11/19/2012 10:55:37 PM viktor (at) szepe (dot) net Comment #4 Reply to this comment
$v is correctly used since it contains the UID of the message.
here $v comes from the foreach, later on it becomes a huge array:

foreach ($ids as $k => $v) {
     if (!isset($fetch_res[$v])) {
         continue;
     }

     $f = $fetch_res[$v];
     $v = array(
         'envelope' => $f->getEnvelope(),
         'flags' => $f->getFlags(),
         'headers' => $f->getHeaders('imp', 
Horde_Imap_Client_Data_Fetch::HEADER_PARSE),
         'idx' => $k,
         'mailbox' => $mbox,
         'size' => $f->getSize(),
         'uid' => $f->getUid()
     );

     if (($options['preview'] === 2) ||
11/19/2012 10:52:03 PM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
imp/lib/Mailbox/List.php:205

$v is used instead of $k as index
around 8 times

patch: changes the [indexes] to $k
Why do you think this?  $k contains the index of the message in the 
mailbox.  That number can change on any future page load (which is 
precisely why you are seeing incorrect messages being loaded).

$v is correctly used since it contains the UID of the message.
11/19/2012 08:11:06 PM viktor (at) szepe (dot) net Comment #2 Reply to this comment
patch: changes the [indexes] to $k
Now it shows previews from different messages :)
11/19/2012 07:45:38 PM viktor (at) szepe (dot) net Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ typos (lots) in preview
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
Reply to this comment
imp/lib/Mailbox/List.php:205

$v is used instead of $k as index
around 8 times

patch: changes the [indexes] to $k

Saved Queries