From 25d8ba63b3c4831050e5d190cd42cf2b0b0f3a30 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Fri, 30 Jun 2006 18:02:28 -0400
Subject: [PATCH] Misc bug and compatibility fixes
---
CHANGELOG | 9 +++++++++
INSTALL | 1 +
program/steps/mail/check_recent.inc | 2 +-
program/steps/mail/func.inc | 2 ++
program/localization/fr/labels.inc | 4 ++--
program/lib/imap.inc | 4 ++--
program/js/app.js | 25 +++++++++++++++----------
program/include/rcube_imap.inc | 4 ++--
8 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index ed07dce..1ed96f3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,15 @@
CHANGELOG RoundCube Webmail
---------------------------
+2006/06/30 (richs)
+----------
+- Fixed empty INBOX compatibility bug (Patch #1443200)
+- Temporarily fixed French "compact" localization (Patch #1483862)
+- Fixed "Select All" not working with Delete interface button (Bug #1332434)
+- Fixed messsage list column compatibility with Konqueror (Bug #1395711)
+- Fixed "unread count" in window title when count changed (Bug #1483812)
+- Fixed DB error when deleting from message table (Patch #1483835)
+
2006/06/29 (richs)
----------
- Added ability to remove attachments (Feature #1436721)
diff --git a/INSTALL b/INSTALL
index dd52fa5..efe0604 100644
--- a/INSTALL
+++ b/INSTALL
@@ -9,6 +9,7 @@
* php.ini options:
- error_reporting E_ALL & ~E_NOTICE (or lower)
- file_uploads on (for attachment upload features)
+ - memory_limit (increase as suitable to support large attachments)
* A MySQL or PostgreSQL database engine or the SQLite extension for PHP
* A database with permission to create tables
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index d825a35..bb31464 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -1060,8 +1060,8 @@
$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 fb103bf..174920c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1452,6 +1452,7 @@
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 @@
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 @@
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 @@
{
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 @@
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);
@@ -3121,11 +3131,6 @@
document.title = '('+count+') '+doc_title;
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 51db669..b8f3dea 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -675,7 +675,7 @@
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 @@
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 2fb2d6e..9362ed7 100644
--- a/program/localization/fr/labels.inc
+++ b/program/localization/fr/labels.inc
@@ -108,7 +108,7 @@
$labels['none'] = 'Aucun';
$labels['unread'] = 'Non lus';
-$labels['compact'] = 'Compresser';
+//$labels['compact'] = 'Compresser';
$labels['empty'] = 'Vider';
$labels['purge'] = 'Purger';
@@ -203,4 +203,4 @@
$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 e51cbf8..f949eb2 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -32,7 +32,7 @@
$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 7e2b3b2..266c163 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -500,6 +500,8 @@
&& !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++)
{
--
Gitblit v1.9.1