Skip to content
Permalink
Browse files

How about this?

  • Loading branch information...
highstrike committed Jun 24, 2015
1 parent ef1fc7d commit 8257100f542cf4b7fe1eefc4918c62888d25390b
@@ -0,0 +1 @@
<div id="<?php echo $key; ?>Message" class="<?php echo !empty($params['class']) ? $params['class'] : 'message'; ?>"><?php echo $message; ?></div>
@@ -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 @@ public function flash($message) {
if ($message === false) {
return;
}
$this->Session->setFlash($message, $this->flash['element'], $this->flash['params'], $this->flash['key']);
$this->Flash->set($message, $this->flash);
}
}
@@ -0,0 +1 @@
<div id="<?php echo $key; ?>Message" class="<?php echo !empty($params['class']) ? $params['class'] : 'message'; ?>"><?php echo $message; ?></div>
@@ -85,15 +85,6 @@ public function render($key = 'flash', $options = array()) {
$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 '<div id="' . $key . 'Message" class="' . $class . '">' . $flash['message'] . '</div>';
}
return $this->_View->element($flash['element'], $flash);
}
}

0 comments on commit 8257100

Please sign in to comment.
You can’t perform that action at this time.