summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Loader.php8
-rw-r--r--system/core/Model.php12
2 files changed, 7 insertions, 13 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index fd43ebbe1..5b051e1a8 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -303,6 +303,8 @@ class CI_Loader {
{
throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
}
+
+ log_message('info', 'CI_Model class loaded');
}
elseif ( ! class_exists('CI_Model', FALSE))
{
@@ -317,6 +319,8 @@ class CI_Loader {
{
throw new RuntimeException($app_path.$class.".php exists, but doesn't declare class ".$class);
}
+
+ log_message('info', config_item('subclass_prefix').'Model class loaded');
}
}
@@ -351,7 +355,9 @@ class CI_Loader {
}
$this->_ci_models[] = $name;
- $CI->$name = new $model();
+ $model = new $model();
+ $CI->$name = $model;
+ log_message('info', 'Model "'.get_class($model).'" initialized');
return $this;
}
diff --git a/system/core/Model.php b/system/core/Model.php
index c809e7b84..691053a9c 100644
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -49,18 +49,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class CI_Model {
/**
- * Class constructor
- *
- * @return void
- */
- public function __construct()
- {
- log_message('info', 'Model Class Initialized');
- }
-
- // --------------------------------------------------------------------
-
- /**
* __get magic
*
* Allows models to access CI's loaded classes using the same