summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-23 12:12:27 +0000
committeralecpl <alec@alec.pl>2009-07-23 12:12:27 +0000
commitee258ce15870e6cb4b733087368a062b5fd66b52 (patch)
tree9b52d654f3abdbcba90db483a7970c5d9c308b44 /program/steps/mail
parenta01b3bf9aee82b142724eb769a40a4d6df5d9e26 (diff)
- performance fix: don't check mbstring functions existence too often
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc6
-rw-r--r--program/steps/mail/show.inc2
-rw-r--r--program/steps/mail/spell_pspell.inc4
3 files changed, 6 insertions, 6 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 1e05c435a..d17840104 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -267,7 +267,7 @@ function rcmail_compose_header_from($attrib)
foreach ($a_to as $addr)
{
if (!empty($addr['mailto']))
- $a_recipients[] = rc_strtolower($addr['mailto']);
+ $a_recipients[] = mb_strtolower($addr['mailto']);
}
if (!empty($MESSAGE->headers->cc))
@@ -276,7 +276,7 @@ function rcmail_compose_header_from($attrib)
foreach ($a_cc as $addr)
{
if (!empty($addr['mailto']))
- $a_recipients[] = rc_strtolower($addr['mailto']);
+ $a_recipients[] = mb_strtolower($addr['mailto']);
}
}
}
@@ -318,7 +318,7 @@ function rcmail_compose_header_from($attrib)
if ($compose_mode == RCUBE_COMPOSE_DRAFT && strstr($MESSAGE->headers->from, $sql_arr['email']))
$from_id = $sql_arr['identity_id'];
// set identity if it's one of the reply-message recipients (with prio for default identity)
- else if (in_array(rc_strtolower($sql_arr['email']), $a_recipients) && (empty($from_id) || $sql_arr['standard']))
+ else if (in_array(mb_strtolower($sql_arr['email']), $a_recipients) && (empty($from_id) || $sql_arr['standard']))
$from_id = $sql_arr['identity_id'];
}
}
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index ffd569d21..068ccbcd7 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -162,7 +162,7 @@ function rcmail_message_attachments($attrib)
$ol .= html::tag('li', null, sprintf("%s (%s)", Q($attach_prop->filename), Q(show_bytes($attach_prop->size))));
}
else {
- if (rc_strlen($attach_prop->filename) > 50) {
+ if (mb_strlen($attach_prop->filename) > 50) {
$filename = abbreviate_string($attach_prop->filename, 50);
$title = $attach_prop->filename;
}
diff --git a/program/steps/mail/spell_pspell.inc b/program/steps/mail/spell_pspell.inc
index 8e574a62d..717b92ee5 100644
--- a/program/steps/mail/spell_pspell.inc
+++ b/program/steps/mail/spell_pspell.inc
@@ -49,13 +49,13 @@ $words = preg_split('/[ !"#$%&()*+\\,-.\/\n:;<=>?@\[\]^_{|}]+/', $text, NULL, P
$plink = pspell_new(get_input_value('lang', RCUBE_INPUT_GET), null, null, RCMAIL_CHARSET, PSPELL_FAST);
// send output
-$out = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><spellresult charschecked="'.rc_strlen($text).'">';
+$out = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><spellresult charschecked="'.mb_strlen($text).'">';
$diff = 0;
foreach ($words as $w) {
$word = trim($w[0]);
$pos = $w[1] - $diff;
- $len = rc_strlen($word);
+ $len = mb_strlen($word);
if ($word && $plink && !pspell_check($plink, $word)) {
$suggestions = pspell_suggest($plink, $word);
if (sizeof($suggestions)>10)