mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Closes #3429, scripts_for_layout are lost when you send an email with EmailComponent
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5874 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
beb600094b
commit
56425c7f39
2 changed files with 5 additions and 3 deletions
|
@ -362,7 +362,7 @@ class EmailComponent extends Object{
|
|||
$viewClass = $viewClass . 'View';
|
||||
loadView($this->Controller->view);
|
||||
}
|
||||
$View = new $viewClass($this->Controller);
|
||||
$View = new $viewClass($this->Controller, false);
|
||||
$View->layout = $this->layout;
|
||||
$msg = null;
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ class View extends Object {
|
|||
*
|
||||
* @return View
|
||||
*/
|
||||
function __construct(&$controller) {
|
||||
function __construct(&$controller, $register = true) {
|
||||
if (is_object($controller)) {
|
||||
$count = count($this->__passedVars);
|
||||
for ($j = 0; $j < $count; $j++) {
|
||||
|
@ -278,7 +278,9 @@ class View extends Object {
|
|||
);
|
||||
}
|
||||
parent::__construct();
|
||||
ClassRegistry::addObject('view', $this);
|
||||
if($register) {
|
||||
ClassRegistry::addObject('view', $this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue