mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Mailing now considered to be 'frontend' when loading templates. Fixes consistency issues. (eg. login notifications etc.)
This commit is contained in:
parent
bb6ebd1732
commit
ce539d82c4
@ -1996,7 +1996,7 @@ class e107
|
||||
*
|
||||
* @param string $id - file prefix, e.g. user for user_template.php
|
||||
* @param string|null $key
|
||||
* @param boolean $override see {@link getThemeInfo()}
|
||||
* @param mixed $override see {@link getThemeInfo()} true/false, front or admin.
|
||||
* @param boolean $merge merge theme with core templates, default is false
|
||||
* @param boolean $info retrieve template info only
|
||||
* @return string|array
|
||||
|
@ -2093,7 +2093,7 @@ class e_parse extends e_parser
|
||||
'e_HANDLER/' => '{e_HANDLER}', // BC
|
||||
'e_MEDIA/' => '{e_MEDIA}',
|
||||
'e_WEB/' => '{e_ADMIN}',
|
||||
'THEME/' => '{THEME}',
|
||||
// 'THEME/' => '{THEME}',
|
||||
);
|
||||
|
||||
|
||||
|
@ -155,6 +155,7 @@ class e107Email extends PHPMailer
|
||||
|
||||
public $legacyBody = false; // TRUE enables legacy conversion of plain text body to HTML in HTML emails
|
||||
private $debug = false; // echos various debug info when set to true.
|
||||
private $pref = array(); // Store code prefs.
|
||||
|
||||
/**
|
||||
* Constructor sets up all the global options, and sensible defaults - it should be the only place the prefs are accessed
|
||||
@ -175,6 +176,8 @@ class e107Email extends PHPMailer
|
||||
{
|
||||
$this->debug = true;
|
||||
}
|
||||
|
||||
$this->pref = $pref;
|
||||
|
||||
$this->CharSet = 'utf-8';
|
||||
$this->SetLanguage(CORE_LC);
|
||||
@ -606,14 +609,11 @@ class e107Email extends PHPMailer
|
||||
{
|
||||
|
||||
|
||||
if($tmpl = e107::getCoreTemplate('email', $eml['template'], true, true)) //FIXME - Core template is failing with template 'notify'. Works with theme template. Issue with core template registry?
|
||||
{
|
||||
// $filter = array("\n", "\t");
|
||||
// $tmpl['header'] = str_replace($filter,'', $tmpl['header']);
|
||||
// $tmpl['footer'] = str_replace($filter,'', $tmpl['footer']);
|
||||
|
||||
$eml['shortcodes']['BODY'] = $eml['email_body'];
|
||||
$eml['shortcodes']['SUBJECT'] = $eml['email_subject'];
|
||||
if($tmpl = e107::getCoreTemplate('email', $eml['template'], 'front', true)) //FIXME - Core template is failing with template 'notify'. Works with theme template. Issue with core template registry?
|
||||
{
|
||||
$eml['shortcodes']['BODY'] = $eml['email_body'];
|
||||
$eml['shortcodes']['SUBJECT'] = $eml['email_subject'];
|
||||
$eml['shortcodes']['THEME'] = e_THEME.$this->pref['sitetheme'].'/'; // Always use front-end theme path.
|
||||
|
||||
$emailBody = $tmpl['header']. $tmpl['body'] . $tmpl['footer'];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user