summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-06-04 09:13:06 +0000
committerthomascube <thomas@roundcube.net>2008-06-04 09:13:06 +0000
commit65cc1c196f0aff83a6c9db7b6e3a36630b66392d (patch)
treeb113cb831e9c0b9f091873e0c142b7f724fba7a7 /program
parent5d6ec21f9fb4011e8a6c78ca77631b5879469228 (diff)
Chech for mb_convert_encoding first because mbstring is optional for RoundCube + add some phpdoc
Diffstat (limited to 'program')
-rw-r--r--program/lib/washtml.php3
-rw-r--r--program/steps/mail/func.inc8
2 files changed, 9 insertions, 2 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index f45fd458a..ad5f930dc 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -187,7 +187,8 @@ class washtml
//Charset seems to be ignored (probably if defined in the HTML document)
$node = new DOMDocument('1.0', $config['charset']);
$full = true;
- $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
+ if (function_exists('mb_convert_encoding'))
+ $html = mb_convert_encoding($html, 'HTML-ENTITIES', $config['charset']);
@$node->loadHTML($html);
return self::dumpHtml($node, $config, $full);
}
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 0a1e4d4c7..85b04319f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -514,9 +514,15 @@ function rcmail_get_messagecount_text($count=NULL, $page=NULL)
/**
+ * Convert the given message part to proper HTML
+ * which can be displayed the message view
*
+ * @param object rcube_message_part Message part
+ * @param bool True if external objects (ie. images ) are allowed
+ * @param bool True if part should be converted to plaintext
+ * @return string Formatted HTML string
*/
-function rcmail_print_body($part, $safe=FALSE, $plain=FALSE)
+function rcmail_print_body($part, $safe=false, $plain=false)
{
global $REMOTE_OBJECTS;