From bfa741d19c1c9f38a86fc32cf851f049df85f353 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 6 Jan 2015 10:45:15 -0600 Subject: [PATCH] oops: Add ::asVar to generic ThreadBody class --- include/class.thread.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/class.thread.php b/include/class.thread.php index 44ab73e28..6b0df71d4 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -1377,6 +1377,11 @@ class ThreadBody /* extends SplString */ { return $this->display('html'); } + function asVar() { + // Email template, assume HTML + return $this->display('email'); + } + function display($format=false) { throw new Exception('display: Abstract display() method not implemented'); } @@ -1421,11 +1426,6 @@ class TextThreadBody extends ThreadBody { return '<pre>'.$this->body.'</pre>'; } } - - function asVar() { - // Email template, assume HTML - return $this->display('email'); - } } class HtmlThreadBody extends ThreadBody { function __construct($body, $options=array()) { -- GitLab