From 984412605215a702c7fb6011a8c9acf0cd2ff8da Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Wed, 17 Jan 2007 14:13:39 +0000 Subject: [PATCH] Put mail smarty cache in a separated directory git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1351 839d8a87-29fc-0310-9880-83ba4fa771e5 --- Makefile | 4 ++-- classes/plmailer.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2a26014..e6a32b0 100644 --- a/Makefile +++ b/Makefile @@ -32,9 +32,9 @@ q: ## core ## -core: spool/templates_c include/globals.inc.php configs/platal.cron +core: spool/templates_c spool/templates_c/mails include/globals.inc.php configs/platal.cron -spool/templates_c spool/uploads: +spool/templates_c spool/templates_c/mails spool/uploads: mkdir -p $@ chmod o+w $@ diff --git a/classes/plmailer.php b/classes/plmailer.php index 151df42..46a854e 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -37,8 +37,9 @@ class PlMail extends Smarty $this->compile_check = true; $this->template_dir = $globals->spoolroot . "/templates/"; - $this->compile_dir = $globals->spoolroot . "/spool/templates_c/"; + $this->compile_dir = $globals->spoolroot . "/spool/templates_c/mails/"; $this->config_dir = $globals->spoolroot . "/configs/"; + $this->register_outputfilter(Array($this, 'mail_format')); $this->register_function('from', Array($this, 'setFrom')); @@ -237,6 +238,7 @@ class PlMailer extends Mail_Mime { private function processPage($with_html = true) { + $level = error_reporting(0); if (!is_null($this->page)) { $this->setTxtBody($this->page->run(false)); if ($with_html) { @@ -246,6 +248,7 @@ class PlMailer extends Mail_Mime { } } } + error_reporting($level); } public function send($with_html = true) -- 2.1.4