Skip to content

Commit

Permalink
Don't show thread list link if only one message
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 6, 2014
1 parent 9bfad03 commit 4b4f7b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion imp/lib/Basic/Thread.php
Expand Up @@ -73,6 +73,8 @@ protected function _init()
/* Force images to show in HTML data. */
$injector->getInstance('IMP_Images')->alwaysShow = true;

$multiple = (count($imp_indices) > 1);

foreach ($imp_indices as $ob) {
$imp_imap = $ob->mbox->imp_imap;
$fetch_res = $imp_imap->fetch($ob->mbox, $query, array(
Expand Down Expand Up @@ -120,7 +122,9 @@ protected function _init()
if (empty($subject)) {
$subject = preg_replace('/^re:\s*/i', '', $subject_header);
}
$curr_msg['link'] = Horde::widget(array('url' => '#display', 'title' => _("Thread List"), 'nocheck' => true));
$curr_msg['link'] = $multiple
? Horde::widget(array('url' => '#display', 'title' => _("Thread List"), 'nocheck' => true))
: '';
$curr_tree['subject'] = $imp_mailbox->getThreadOb($imp_mailbox->getArrayIndex($fetch_res[$idx]->getUid(), $ob->mbox) + 1)->img;
break;

Expand Down

0 comments on commit 4b4f7b1

Please sign in to comment.