Removing the magical addition of SessionComponent to components array. This makes components more declarative, and removes magic that cannot be undone by the end developer.

This commit is contained in:
Mark Story 2010-01-13 23:16:51 -05:00
parent eb2c34afa0
commit ebf99de965
2 changed files with 1 additions and 4 deletions

View file

@ -185,9 +185,6 @@ class Component extends Object {
function _loadComponents(&$object, $parent = null) { function _loadComponents(&$object, $parent = null) {
$base = $this->__controllerVars['base']; $base = $this->__controllerVars['base'];
$normal = Set::normalize($object->components); $normal = Set::normalize($object->components);
if ($parent == null) {
$normal = Set::merge(array('Session' => null), $normal);
}
foreach ((array)$normal as $component => $config) { foreach ((array)$normal as $component => $config) {
$plugin = isset($this->__controllerVars['plugin']) ? $this->__controllerVars['plugin'] . '.' : null; $plugin = isset($this->__controllerVars['plugin']) ? $this->__controllerVars['plugin'] . '.' : null;
list($plugin, $component) = pluginSplit($component, true, $plugin); list($plugin, $component) = pluginSplit($component, true, $plugin);

View file

@ -229,7 +229,7 @@ class Controller extends Object {
* @access public * @access public
* @link http://book.cakephp.org/view/53/components-helpers-and-uses * @link http://book.cakephp.org/view/53/components-helpers-and-uses
*/ */
var $components = array(); var $components = array('Session');
/** /**
* The name of the View class this controller sends output to. * The name of the View class this controller sends output to.