From 09941ea763db08c7b13263fae68cf6eb01bc7bcf Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 13 Oct 2005 21:53:33 +0000 Subject: Some error messages added --- program/steps/mail/compose.inc | 9 +++++++-- program/steps/mail/func.inc | 2 +- program/steps/mail/move_del.inc | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index f65e4ff7b..52b64d804 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -404,7 +404,7 @@ function rcmail_compose_subject($attrib) // create a reply-subject else if (isset($REPLY_MESSAGE['subject'])) { - if (strpos($REPLY_MESSAGE['subject'], 'Re:')===0) + if (eregi('^re:', $REPLY_MESSAGE['subject'])) $subject = $REPLY_MESSAGE['subject']; else $subject = 'Re: '.$REPLY_MESSAGE['subject']; @@ -412,7 +412,12 @@ function rcmail_compose_subject($attrib) // create a forward-subject else if (isset($FORWARD_MESSAGE['subject'])) - $subject = 'Fwd: '.$FORWARD_MESSAGE['subject']; + { + if (eregi('^fwd:', $REPLY_MESSAGE['subject'])) + $subject = $FORWARD_MESSAGE['subject']; + else + $subject = 'Fwd: '.$FORWARD_MESSAGE['subject']; + } $out = $form_start ? "$form_start\n" : ''; diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 6ffde1c90..e3437db4f 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -549,7 +549,7 @@ function rcmail_print_body($part, $safe=FALSE, $plain=FALSE) // $body, $ctype_pr // make links and email-addresses clickable $convert_patterns = $convert_replaces = $replace_strings = array(); - $url_chars = 'a-z0-9_\-\+\*\$\/&%=@#'; + $url_chars = 'a-z0-9_\-\+\*\$\/&%=@#:'; $url_chars_within = '\?\.~,!'; $convert_patterns[] = "/([\w]+):\/\/([a-z0-9\-\.]+[a-z]{2,4}([$url_chars$url_chars_within]*[$url_chars])?)/ie"; diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index 4972478f1..20d46e37d 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -30,6 +30,9 @@ if ($_action=='moveto' && $_GET['_uid'] && $_GET['_target_mbox']) if (!$moved) { // send error message + $commands = "this.list_mailbox();\n"; + $commands .= show_message('errormoving', 'error'); + rcube_remote_response($commands); exit; } } @@ -43,6 +46,9 @@ else if ($_action=='delete' && $_GET['_uid']) if (!$del) { // send error message + $commands = "this.list_mailbox();\n"; + $commands .= show_message('errordeleting', 'error'); + rcube_remote_response($commands); exit; } } -- cgit v1.2.3