Added missing 'Session'-Compomnent in bake

If a Controller was baked interactively and one want to use Session flash messages, the required 'Session'-Component wasn't added to the $components-Array
This commit is contained in:
ukk1337 2014-02-04 13:35:48 +01:00
parent 2cd72126fe
commit 9670a5af88

View file

@ -184,6 +184,10 @@ class ControllerTask extends BakeTask {
$wannaUseSession = $this->in(
__d('cake_console', "Would you like to use Session flash messages?"), array('y', 'n'), 'y'
);
if (strtolower($wannaUseSession) === 'y') {
array_push($components, 'Session');
}
}
} else {
list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods();