Skip to content

Commit

Permalink
mailbox value is worthless as backup, since it is encoded
Browse files Browse the repository at this point in the history
Instead, always send label and default title to the label value
  • Loading branch information
slusarz committed Jun 9, 2014
1 parent ce898ec commit 5a22a70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions imp/js/dimpbase.js
Expand Up @@ -4136,7 +4136,7 @@ var IMP_Flist_Mbox = Class.create({
// Extra fields: dummy, elt, fixed, ftype, unseen
this.data = ob;

title = ob.t || ob.m;
title = ob.t || ob.l;

/* Create a dummy container element in normal mailboxes section
* if special mailbox has children. */
Expand Down Expand Up @@ -4331,7 +4331,7 @@ var IMP_Flist_Mbox = Class.create({

label: function()
{
return this.data.l || this.data.m;
return this.data.l;
},

fs: function()
Expand Down
11 changes: 3 additions & 8 deletions imp/lib/Ajax/Queue.php
Expand Up @@ -594,7 +594,6 @@ protected function _addFtreeInfo(IMP_Ajax_Application $ajax)
* - i: (string) [icon] A user defined icon to use.
* DEFAULT: none
* - l: (string) [label] The mailbox display label.
* DEFAULT: 'm' val
* - m: (string) [mbox] The mailbox value (base64url encoded).
* - n: (boolean) [non-imap] A non-IMAP element?
* DEFAULT: no
Expand All @@ -612,7 +611,7 @@ protected function _addFtreeInfo(IMP_Ajax_Application $ajax)
* - s: (boolean) [special] Is this a "special" element?
* DEFAULT: no
* - t: (string) [title] Mailbox title.
* DEFAULT: 'm' val
* DEFAULT: 'l' val
* - un: (boolean) [unsubscribed] Is this mailbox unsubscribed?
* DEFAULT: no
* - v: (integer) [virtual] Virtual folder? 0 = not vfolder, 1 = system
Expand Down Expand Up @@ -640,16 +639,12 @@ protected function _ftreeElt($id)
$ob->nc = 1;
}

$ob->l = htmlspecialchars($mbox_ob->abbrev_label);
$label = $mbox_ob->label;
if ($ob->m != $label) {
if ($ob->l != $label) {
$ob->t = $label;
}

$tmp = htmlspecialchars($mbox_ob->abbrev_label);
if ($ob->m != $tmp) {
$ob->l = $tmp;
}

$parent = $elt->parent;
if (!$parent->base_elt) {
$ob->pa = $parent->mbox_ob->form_to;
Expand Down

0 comments on commit 5a22a70

Please sign in to comment.