Merging fixes and enhancements into trunk.

Revision: [2120]
Added fix for error in Controller::cleanUpFields().
Fixed typo in Scaffold::__scaffoldUpdate().

Revision: [2119]
Added fix for missing view error.
Added changes to allow SessionComponent::flash() to return similar to what was suggested in Ticket #430.
Changed delimiter to -! in the arrays used in DboSource::conditions().
Fixed single quotes being added when value was empty

Revision: [2118]
Corrected some bugs found in DboSource::conditions();
Added loading of app/config/bootstrap.php to index.php after the core bootstrap.php loads.
Changed doc block comment in app/config/bootstrap.php

Revision: [2117]
"Adding  app/config/bootstrap.php.
Used for application wide settings"

Revision: [2116]
"Added better regex to the DboSource::fields()"

Revision: [2115]
Moving the DIRECTORY_SEPARATOR to top section of the file

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2121 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-02-25 04:42:31 +00:00
parent a1170b57d4
commit 7a9fff407a
8 changed files with 115 additions and 76 deletions

View file

@ -140,24 +140,33 @@ class SessionComponent extends Object
}
/**
* Enter description here...
* Used to output or return the value of the Message flash.
*
* Use like this. $this->Session->flash();
*
* @return
*/
function flash()
* @param string $css css class used in the div tag
* @param boolean $return setting to true return the value of the flash message instead of displaying
* @return message output
* */
function flash($css = 'message', $return = false)
{
if($this->check('Message.flash'))
{
echo '<div class="message">'.$this->read('Message.flash').'</div>';
$this->del('Message.flash');
if($return === false)
{
echo '<div class="'.$css.'">'.$this->read('Message.flash').'</div>';
$this->del('Message.flash');
return;
}
else
{
$return = $this->read('Message.flash');
$this->del('Message.flash');
return $return;
}
}
else
{
return false;
}
}
/**