From: Florent Bruneau Date: Sun, 15 Jun 2008 16:46:35 +0000 (+0200) Subject: Smarty debug for templated mails. X-Git-Tag: core/1.0.0~108 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=2295525912c58294f2df275051c228de14adff80;p=platal.git Smarty debug for templated mails. Signed-off-by: Florent Bruneau --- diff --git a/classes/plmailer.php b/classes/plmailer.php index 6b6fd0d..2106d50 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -265,7 +265,10 @@ class PlMailer extends Mail_Mime { private function processPage($with_html = true) { if (!is_null($this->page)) { - $level = error_reporting(0); + global $globals; + if (!($globals->debug & DEBUG_SMARTY)) { + $level = error_reporting(0); + } $this->page->run('head'); // process page headers $this->wiki = trim($this->page->run('wiki')); // get wiki if (!$this->wiki) { @@ -277,7 +280,9 @@ class PlMailer extends Mail_Mime { } } } - error_reporting($level); + if (!($globals->debug & DEBUG_SMARTY)) { + error_reporting($level); + } } if ($this->wiki) { $this->setTxtBody(MiniWiki::WikiToText($this->wiki, false, 0, 78));