diff --git a/module/api/model.php b/module/api/model.php index 41cbec9b8d..4aae257696 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -15,7 +15,7 @@ class apiModel extends model { $fileName = dirname($filePath); $className = basename(dirname(dirname($filePath))); - if(!class_exists($className)) include($fileName); + if(!class_exists($className)) helper::import($fileName); $methodName = basename($filePath); $method = new ReflectionMethod($className . $ext, $methodName); diff --git a/module/editor/model.php b/module/editor/model.php index 5e89896a77..fb0e7d8821 100644 --- a/module/editor/model.php +++ b/module/editor/model.php @@ -392,7 +392,7 @@ class editorModel extends model public function extendModel($filePath) { $className = basename(dirname(dirname($filePath))); - if(!class_exists($className)) include(dirname($filePath)); + if(!class_exists($className)) helper::import(dirname($filePath)); $methodName = basename($filePath); $methodParam = $this->getParam($className, $methodName, 'Model'); return $fileContent = <<