Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
2b3492ab
Commit
2b3492ab
authored
Dec 09, 2011
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yii references fix
parent
a3a4dbaa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Module.php
framework/base/Module.php
+8
-5
No files found.
framework/base/Module.php
View file @
2b3492ab
...
@@ -253,13 +253,17 @@ abstract class Module extends Component
...
@@ -253,13 +253,17 @@ abstract class Module extends Component
$config
=
$this
->
_moduleConfig
[
$id
];
$config
=
$this
->
_moduleConfig
[
$id
];
if
(
!
isset
(
$config
[
'enabled'
])
||
$config
[
'enabled'
])
if
(
!
isset
(
$config
[
'enabled'
])
||
$config
[
'enabled'
])
{
{
Yii
::
trace
(
"Loading
\"
$id
\"
module"
,
'system.base.CModule'
);
\
Yii
::
trace
(
"Loading
\"
$id
\"
module"
,
'system.base.CModule'
);
$class
=
$config
[
'class'
];
$class
=
$config
[
'class'
];
unset
(
$config
[
'class'
],
$config
[
'enabled'
]);
unset
(
$config
[
'class'
],
$config
[
'enabled'
]);
if
(
$this
===
Yii
::
app
())
if
(
$this
===
\Yii
::
$app
)
{
$module
=
Yii
::
create
(
$class
,
$id
,
null
,
$config
);
$module
=
Yii
::
create
(
$class
,
$id
,
null
,
$config
);
}
else
else
{
$module
=
Yii
::
create
(
$class
,
$this
->
getId
()
.
'/'
.
$id
,
$this
,
$config
);
$module
=
Yii
::
create
(
$class
,
$this
->
getId
()
.
'/'
.
$id
,
$this
,
$config
);
}
return
$this
->
_modules
[
$id
]
=
$module
;
return
$this
->
_modules
[
$id
]
=
$module
;
}
}
}
}
...
@@ -360,10 +364,9 @@ abstract class Module extends Component
...
@@ -360,10 +364,9 @@ abstract class Module extends Component
$config
=
$this
->
_componentConfig
[
$id
];
$config
=
$this
->
_componentConfig
[
$id
];
if
(
!
isset
(
$config
[
'enabled'
])
||
$config
[
'enabled'
])
if
(
!
isset
(
$config
[
'enabled'
])
||
$config
[
'enabled'
])
{
{
Yii
::
trace
(
"Loading
\"
$id
\"
application component"
,
'system.CModule'
);
\
Yii
::
trace
(
"Loading
\"
$id
\"
application component"
,
'system.CModule'
);
unset
(
$config
[
'enabled'
]);
unset
(
$config
[
'enabled'
]);
$component
=
Yii
::
create
(
$config
);
$component
=
\Yii
::
create
(
$config
);
$component
->
init
();
return
$this
->
_components
[
$id
]
=
$component
;
return
$this
->
_components
[
$id
]
=
$component
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment