Fix errors when generating thread page.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Jan 2010 23:01:02 +0000 (16:01 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Jan 2010 23:04:44 +0000 (16:04 -0700)
imp/thread.php

index bf72f1d..bea4b94 100644 (file)
@@ -147,11 +147,10 @@ $template->set(
 if ($mode == 'thread') {
     $delete_link = IMP::generateIMPUrl('mailbox.php', $mbox)->add(array(
         'actionID' => 'delete_messages',
-        'mailbox_token' => Horde::getRequestToken('imp.mailbox'),
-        'start' => $imp_mailbox->getArrayIndex($idx)
+        'mailbox_token' => Horde::getRequestToken('imp.mailbox')
     ));
     foreach ($thread as $val) {
-        $delete_link->add(array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox']));
+        $delete_link->add(array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox'], 'start' => $imp_mailbox->getArrayIndex($val)));
     }
     $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread"), null, $registry->getImageDir('horde')) . '</a>');
 }