[eluser]dfau[/eluser]
Hi wiredesignz,
Just noticed in my logs that files are getting loaded multiple times - don't know if it's just debug, would you please be able to have a quick look and clarify? The below is test code only, vanilla CI 1.6.2 with ME 4.1.17, change welcome controller to call to two methods in one module.
Welcome controller:
Code:
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function _foo() {
modules::run('foobar', NULL, 'two');
}
function index()
{
modules::run('foobar', NULL, 'one');
$this->_foo();
$this->load->view('welcome_message');
}
}
The module:
Code:
class Foobar extends Controller {
/*
*/
function
Foobar() {
parent::Controller();
}
/*
*/
function
one() {
}
function
two() {
}
and the log file:
Code:
DEBUG - 2008-06-03 17:47:03 --> Config Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Hooks Class Initialized
DEBUG - 2008-06-03 17:47:03 --> URI Class Initialized
DEBUG - 2008-06-03 17:47:03 --> No URI present. Default controller set.
DEBUG - 2008-06-03 17:47:03 --> Router Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Output Class Initialized
ERROR - 2008-06-03 17:47:03 --> Severity: Warning --> fopen(../system/cache/70efdf2ec9b086079795c442636b55fb) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied /home/dfogarty/dev/ci162_me41/system/codeigniter/Common.php 49
DEBUG - 2008-06-03 17:47:03 --> Input Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Global POST and COOKIE data sanitized
DEBUG - 2008-06-03 17:47:03 --> Language Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Loader Class Initialized
DEBUG - 2008-06-03 17:47:03 --> File loaded: ../application/config/autoload.php
DEBUG - 2008-06-03 17:47:03 --> Helpers loaded: url_helper
DEBUG - 2008-06-03 17:47:03 --> Helpers loaded: file_helper
DEBUG - 2008-06-03 17:47:03 --> Database Driver Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Welcome Controller Initialized
DEBUG - 2008-06-03 17:47:03 --> File loaded: ../application/modules/foobar/controllers/foobar.php
DEBUG - 2008-06-03 17:47:03 --> File loaded: ../application/config/autoload.php
DEBUG - 2008-06-03 17:47:03 --> Helpers loaded: url_helper
DEBUG - 2008-06-03 17:47:03 --> Helpers loaded: file_helper
DEBUG - 2008-06-03 17:47:03 --> Database Driver Class Initialized
DEBUG - 2008-06-03 17:47:03 --> Foobar Controller Initialized
DEBUG - 2008-06-03 17:47:03 --> File loaded: ../application/views/welcome_message.php
DEBUG - 2008-06-03 17:47:03 --> Final output sent to browser
DEBUG - 2008-06-03 17:47:03 --> Total execution time: 0.0660
EDIT: It looks like files get re-loaded when a module is loaded...?
EDIT: also Database class says it's initialised again.
EDIT: and autoloading just database library, url helper and file helper
Thanks very much,
df