Merge pull request #900 from TheSerapher/issue-899

[SECURITY] Clear cache before sending a mail
This commit is contained in:
Sebastian Grewe 2013-12-04 10:35:13 -08:00
commit 3c8e0091ff

View File

@ -56,6 +56,9 @@ class Mail extends Base {
* email : Destination address
**/
public function sendMail($template, $aData) {
// Make sure we don't load a cached filed
$this->smarty->clearCache(BASEPATH . 'templates/mail/' . $template . '.tpl');
$this->smarty->clearCache(BASEPATH . 'templates/mail/subject.tpl');
$this->smarty->assign('WEBSITENAME', $this->setting->getValue('website_name'));
$this->smarty->assign('SUBJECT', $aData['subject']);
$this->smarty->assign('DATA', $aData);