diff --git a/include/class.thread.php b/include/class.thread.php index 8d468d9595cd1bffb5563963c4545a2b85637cc2..e78b7ec415cc87c4098a58a362b185974e957cc2 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -776,7 +776,7 @@ Class ThreadEntry { } function asVar() { - return (string) $this; + return (string) $this->getBody()->display('html'); } function getVar($tag) { @@ -1380,6 +1380,11 @@ class TextThreadBody extends ThreadBody { return '<pre>'.$this->body.'</pre>'; } } + + function asVar() { + // Email template, assume HTML + return $this->display('html'); + } } class HtmlThreadBody extends ThreadBody { function __construct($body, $options=array()) {