Skip to content

Commit

Permalink
#13209: Fix remote name in sent-mail list
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jun 9, 2014
1 parent 2fa2f97 commit 1c3098f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions imp/lib/Ftree/Element.php
Expand Up @@ -124,6 +124,11 @@ public function __get($name)
while ($elt = $elt->parent) {
if ($elt->namespace) {
return $i + 1;
} elseif ($elt->remote) {
if ($this->remote_mbox) {
++$i;
}
return $i + 1;
}
}

Expand Down
3 changes: 2 additions & 1 deletion imp/lib/Ftree/IteratorFilter/Nonimap.php
Expand Up @@ -28,7 +28,8 @@ public function accept()
{
$curr = $this->current();

return (!$curr->nonimap || ($curr->namespace && $curr->children));
return (!$curr->nonimap ||
(($curr->remote || $curr->namespace) && $curr->children));
}

}
10 changes: 7 additions & 3 deletions imp/lib/Mailbox.php
Expand Up @@ -349,9 +349,13 @@ public function __get($key)
return $this->label;
}

return (($pos = strrpos($this->_mbox, $this->namespace_delimiter)) === false)
? strval($this)
: substr($this->_mbox, $pos + 1);
$mbox = $this->remote_mbox
? $this->label
: $this->_mbox;

return (($pos = strrpos($mbox, $this->namespace_delimiter)) === false)
? strval($mbox)
: substr($mbox, $pos + 1);

case 'cacheid':
case 'cacheid_date':
Expand Down

0 comments on commit 1c3098f

Please sign in to comment.