Fix on webmodel
This commit is contained in:
parent
80c27ce1ee
commit
875f2dda9a
1 changed files with 14 additions and 1 deletions
|
|
@ -262,7 +262,20 @@ class Webmodel {
|
||||||
static public function load_model($model)
|
static public function load_model($model)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(is_file(Webmodel::$model_path.'/'.$model.'.php'))
|
$app_model=$model;
|
||||||
|
|
||||||
|
if(strpos('/', $model))
|
||||||
|
{
|
||||||
|
|
||||||
|
$arr_model=explode('/', $model);
|
||||||
|
|
||||||
|
$app_model=$model[0];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$path_model=$app_model.'/models_'.$model.'.php';
|
||||||
|
|
||||||
|
if(is_file(Webmodel::$model_path.'/models_'.$model.'.php'))
|
||||||
{
|
{
|
||||||
|
|
||||||
include(Webmodel::$model_path.'/'.$model.'.php');
|
include(Webmodel::$model_path.'/'.$model.'.php');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue