mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Mailing now considered to be 'frontend' when loading templates. Fixes consistency issues. (eg. login notifications etc.)
This commit is contained in:
@@ -1996,7 +1996,7 @@ class e107
|
|||||||
*
|
*
|
||||||
* @param string $id - file prefix, e.g. user for user_template.php
|
* @param string $id - file prefix, e.g. user for user_template.php
|
||||||
* @param string|null $key
|
* @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 $merge merge theme with core templates, default is false
|
||||||
* @param boolean $info retrieve template info only
|
* @param boolean $info retrieve template info only
|
||||||
* @return string|array
|
* @return string|array
|
||||||
|
@@ -2093,7 +2093,7 @@ class e_parse extends e_parser
|
|||||||
'e_HANDLER/' => '{e_HANDLER}', // BC
|
'e_HANDLER/' => '{e_HANDLER}', // BC
|
||||||
'e_MEDIA/' => '{e_MEDIA}',
|
'e_MEDIA/' => '{e_MEDIA}',
|
||||||
'e_WEB/' => '{e_ADMIN}',
|
'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
|
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 $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
|
* Constructor sets up all the global options, and sensible defaults - it should be the only place the prefs are accessed
|
||||||
@@ -176,6 +177,8 @@ class e107Email extends PHPMailer
|
|||||||
$this->debug = true;
|
$this->debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->pref = $pref;
|
||||||
|
|
||||||
$this->CharSet = 'utf-8';
|
$this->CharSet = 'utf-8';
|
||||||
$this->SetLanguage(CORE_LC);
|
$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?
|
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?
|
||||||
{
|
{
|
||||||
// $filter = array("\n", "\t");
|
$eml['shortcodes']['BODY'] = $eml['email_body'];
|
||||||
// $tmpl['header'] = str_replace($filter,'', $tmpl['header']);
|
$eml['shortcodes']['SUBJECT'] = $eml['email_subject'];
|
||||||
// $tmpl['footer'] = str_replace($filter,'', $tmpl['footer']);
|
$eml['shortcodes']['THEME'] = e_THEME.$this->pref['sitetheme'].'/'; // Always use front-end theme path.
|
||||||
|
|
||||||
$eml['shortcodes']['BODY'] = $eml['email_body'];
|
|
||||||
$eml['shortcodes']['SUBJECT'] = $eml['email_subject'];
|
|
||||||
|
|
||||||
$emailBody = $tmpl['header']. $tmpl['body'] . $tmpl['footer'];
|
$emailBody = $tmpl['header']. $tmpl['body'] . $tmpl['footer'];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user