summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.inc4
-rw-r--r--program/js/app.js25
-rw-r--r--program/lib/imap.inc4
-rw-r--r--program/localization/fr/labels.inc4
-rw-r--r--program/steps/mail/check_recent.inc2
-rw-r--r--program/steps/mail/func.inc2
6 files changed, 24 insertions, 17 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index d825a35b0..bb3146466 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -1060,8 +1060,8 @@ class rcube_imap
$start_index = 100000;
foreach ($a_uids as $uid)
{
- $index = array_search($uid, $a_cache_index);
- $start_index = min($index, $start_index);
+ if(($index = array_search($uid, $a_cache_index)) !== FALSE)
+ $start_index = min($index, $start_index);
}
// clear cache from the lowest index on
diff --git a/program/js/app.js b/program/js/app.js
index fb103bf43..174920cc8 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1452,6 +1452,7 @@ function rcube_webmail()
for (var n in this.list_rows) {
if (!filter || this.list_rows[n][filter]==true)
+ this.last_selected = n;
this.highlight_row(n, true);
}
return true;
@@ -3010,6 +3011,11 @@ function rcube_webmail()
this.env.mailbox = mbox;
};
+ // for reordering column array, Konqueror workaround
+ this.set_message_coltypes = function(coltypes)
+ {
+ this.coltypes = coltypes;
+ }
// create a table row in the message list
this.add_message_row = function(uid, cols, flags, attachment, attop)
@@ -3042,8 +3048,9 @@ function rcube_webmail()
row.appendChild(col);
// add each submitted col
- for (var c in cols)
- {
+ for (var n = 0; n < this.coltypes.length; n++)
+ {
+ var c = this.coltypes[n];
col = document.createElement('TD');
col.className = String(c).toLowerCase();
col.innerHTML = cols[c];
@@ -3087,7 +3094,10 @@ function rcube_webmail()
{
if (!this.gui_objects.mailboxlist)
return false;
-
+
+ if (mbox==this.env.mailbox)
+ set_title = true;
+
var item, reg, text_obj;
mbox = String(mbox).toLowerCase().replace(this.mbox_expression, '');
item = document.getElementById('rcmbx'+mbox);
@@ -3104,14 +3114,14 @@ function rcube_webmail()
text_obj.innerHTML += ' ('+count+')';
else
text_obj.innerHTML = text_obj.innerHTML.replace(reg, '');
-
+
// set the right classes
this.set_classname(item, 'unread', count>0 ? true : false);
}
// set unread count to window title
reg = /^\([0-9]+\)\s+/i;
- if (set_title && count && document.title)
+ if (set_title && document.title)
{
var doc_title = String(document.title);
@@ -3122,11 +3132,6 @@ function rcube_webmail()
else
document.title = doc_title.replace(reg, '');
}
- // remove unread count from window title
- else if (document.title)
- {
- document.title = document.title.replace(reg, '');
- }
};
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 51db669c6..b8f3dea39 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -675,7 +675,7 @@ function iil_C_FetchHeaderIndex(&$conn, $mailbox, $message_set, $index_field, $n
if (empty($index_field)) $index_field="DATE";
$index_field = strtoupper($index_field);
- if (empty($message_set)) return array();
+ if ((empty($message_set)) || ($message_set == "1:0")) return array();
//$fields_a["DATE"] = ($IMAP_USE_INTERNAL_DATE?6:1);
$fields_a['DATE'] = 1;
@@ -2107,4 +2107,4 @@ function iil_C_ClearFolder(&$conn, $folder){
return (iil_C_Expunge($conn, $folder) >= 0);
}
-?> \ No newline at end of file
+?>
diff --git a/program/localization/fr/labels.inc b/program/localization/fr/labels.inc
index 2fb2d6e83..9362ed7e5 100644
--- a/program/localization/fr/labels.inc
+++ b/program/localization/fr/labels.inc
@@ -108,7 +108,7 @@ $labels['all'] = 'Tous';
$labels['none'] = 'Aucun';
$labels['unread'] = 'Non lus';
-$labels['compact'] = 'Compresser';
+//$labels['compact'] = 'Compresser';
$labels['empty'] = 'Vider';
$labels['purge'] = 'Purger';
@@ -203,4 +203,4 @@ $labels['sortasc'] = 'Tri ascendant';
$labels['sortdesc'] = 'Tri descendant';
-?> \ No newline at end of file
+?>
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index e51cbf867..f949eb232 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -32,7 +32,7 @@ foreach ($a_mailboxes as $mbox_name)
$count = $IMAP->messagecount();
$unread_count = $IMAP->messagecount(NULL, 'UNSEEN', TRUE);
- $commands .= sprintf("this.set_unread_count('%s', %d, true);\n", addslashes($mbox_name), $unread_count);
+ $commands .= sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_name), $unread_count);
$commands .= sprintf("this.set_env('messagecount', %d);\n", $count);
$commands .= sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text());
$commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 7e2b3b28d..266c16336 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -500,6 +500,8 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE)
&& !array_search('to', $a_show_cols))
$a_show_cols[$f] = 'to';
+ $commands .= sprintf("this.set_message_coltypes(%s);\n", array2js($a_show_cols));
+
// loop through message headers
for ($n=0; $a_headers[$n]; $n++)
{