X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxorg.mailer.inc.php;h=ccc4791b232fd08dbdeed50a4419fa83af19a6c0;hb=db5db6c8f01cb894fb5f95e7bcef2723e0b1f7e8;hp=70c6dadbcccfd0ca5d4b6a00bad3cc63ef3c0b15;hpb=50a40a33a496131e817df875607ea5542d096a64;p=platal.git diff --git a/include/xorg.mailer.inc.php b/include/xorg.mailer.inc.php index 70c6dad..ccc4791 100644 --- a/include/xorg.mailer.inc.php +++ b/include/xorg.mailer.inc.php @@ -20,7 +20,7 @@ ***************************************************************************/ require_once('diogenes/diogenes.hermes.inc.php'); -require_once('Smarty.class.php'); +require_once('smarty/libs/Smarty.class.php'); // {{{ class XOrgMailer @@ -29,12 +29,7 @@ require_once('Smarty.class.php'); class XOrgMailer extends Smarty { // {{{ properties - - /** Directory used to store mails_templates. - * Smarty::template_dir subdir used to sotre the mails templates. - * The body of the message is taken from a tsmarty template - */ - var $mail_dir = "mails"; + /** stores the mail template name */ var $_tpl; @@ -59,9 +54,9 @@ class XOrgMailer extends Smarty $this->caching=false; $this->compile_check=true; - $this->template_dir = $globals->root . "/templates/"; - $this->compile_dir = $globals->root . "/spool/templates_c/"; - $this->config_dir = $globals->root . "/configs/"; + $this->template_dir = $globals->spoolroot . "/templates/"; + $this->compile_dir = $globals->spoolroot . "/spool/templates_c/"; + $this->config_dir = $globals->spoolroot . "/configs/"; $this->register_outputfilter('mail_format'); $this->register_function('from', 'set_from'); @@ -78,7 +73,7 @@ class XOrgMailer extends Smarty { // do not try to optimize, in the templates, some function can modify our object, then we // have to fetch in the first time, and only then send the mail. - $body = $this->fetch($this->mail_dir."/".$this->_tpl); + $body = $this->fetch($this->_tpl); $mailer = new HermesMailer(); $mailer->setFrom($this->_from); $mailer->addTo(implode(',',$this->_to));