From d19c0f9f309cbe63411a8ddcbbda3daf7461a30d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 12 Dec 2013 02:58:54 -0500 Subject: [PATCH] In normalize_string() replace 4-byte unicode characters with '?' character. These are not supported in default utf-8 charset on mysql, the chance we'd need them in searching is very low. --- program/js/editor.js | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/program/js/editor.js b/program/js/editor.js index 6d7b953..df3d412 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -61,6 +61,9 @@ if (!active) rcmail.spellcheck_state(); }); + ed.onKeyPress.add(function(ed, e) { + rcmail.compose_type_activity++; + }); } } @@ -161,8 +164,8 @@ for (i in files) { att = files[i]; - if (att.complete && att.mimetype.indexOf('image/') == 0) { - list.push([att.name, rcmail.env.comm_path+'&_action=display-attachment&_file='+i+'&_id='+rcmail.env.compose_id]); + if (att.complete && att.mimetype.startsWith('image/')) { + list.push([att.name, rcmail.env.comm_path+'&_id='+rcmail.env.compose_id+'&_action=display-attachment&_file='+i]); } } -- Gitblit v1.9.1