|
|
@@ -1623,6 +1623,11 @@ class CakeEmail {
|
|
|
$View = new $viewClass(null);
|
|
|
$View->viewVars = $this->_viewVars;
|
|
|
$View->helpers = $this->_helpers;
|
|
|
+
|
|
|
+ if ($this->_theme) {
|
|
|
+ $View->theme = $this->_theme;
|
|
|
+ }
|
|
|
+
|
|
|
$View->loadHelpers();
|
|
|
|
|
|
list($templatePlugin, $template) = pluginSplit($this->_template);
|
|
|
@@ -1632,9 +1637,7 @@ class CakeEmail {
|
|
|
} elseif ($layoutPlugin) {
|
|
|
$View->plugin = $layoutPlugin;
|
|
|
}
|
|
|
- if ($this->_theme) {
|
|
|
- $View->theme = $this->_theme;
|
|
|
- }
|
|
|
+
|
|
|
// Convert null to false, as View needs false to disable
|
|
|
// the layout.
|
|
|
if ($layout === null) {
|