diff --git a/lib/Cake/Console/Templates/skel/View/Elements/Flash/default.ctp b/lib/Cake/Console/Templates/skel/View/Elements/Flash/default.ctp new file mode 100644 index 000000000..ce0f61355 --- /dev/null +++ b/lib/Cake/Console/Templates/skel/View/Elements/Flash/default.ctp @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/lib/Cake/Console/Templates/skel/View/Elements/empty b/lib/Cake/Console/Templates/skel/View/Elements/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 3d2169b47..88a8d60b1 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -50,7 +50,7 @@ class AuthComponent extends Component { * * @var array */ - public $components = array('Session', 'RequestHandler'); + public $components = array('Session', 'Flash', 'RequestHandler'); /** * An array of authentication objects to use for authenticating users. You can configure @@ -840,7 +840,7 @@ class AuthComponent extends Component { if ($message === false) { return; } - $this->Session->setFlash($message, $this->flash['element'], $this->flash['params'], $this->flash['key']); + $this->Flash->set($message, $this->flash); } } diff --git a/lib/Cake/View/Elements/Flash/default.ctp b/lib/Cake/View/Elements/Flash/default.ctp new file mode 100644 index 000000000..ce0f61355 --- /dev/null +++ b/lib/Cake/View/Elements/Flash/default.ctp @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/lib/Cake/View/Helper/FlashHelper.php b/lib/Cake/View/Helper/FlashHelper.php index c61765675..46dc67ac4 100644 --- a/lib/Cake/View/Helper/FlashHelper.php +++ b/lib/Cake/View/Helper/FlashHelper.php @@ -85,15 +85,6 @@ class FlashHelper extends AppHelper { $flash = $options + $flash; CakeSession::delete("Message.$key"); - // backwards compatibility with Session->setFlash() - if ($flash['element'] === 'default') { - $class = 'message'; - if (!empty($flash['params']['class'])) { - $class = $flash['params']['class']; - } - return '
' . $flash['message'] . '
'; - } - return $this->_View->element($flash['element'], $flash); } }