mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
eb2c34afa0
commit
ebf99de965
2 changed files with 1 additions and 4 deletions
|
@ -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);
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue