outputhtml : allow an autoloader class
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4143 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -36,12 +36,15 @@ class outputhtml extends output
|
||||
$resView = $data;
|
||||
if ($viewClass !== FALSE && $viewMethod !== FALSE)
|
||||
{
|
||||
if (! class_exists ($viewClass) && empty (spl_autoload_functions ()))
|
||||
if (! class_exists ($viewClass))
|
||||
{
|
||||
if ($module !== "")
|
||||
if ($module !== "" &&
|
||||
file_exists ("modules/$module/views/$viewClass.php"))
|
||||
require_once ("modules/$module/views/$viewClass.php");
|
||||
else
|
||||
elseif (file_exists ("views/$viewClass.php"))
|
||||
require_once ("views/$viewClass.php");
|
||||
// If the file doesn't exists, an autoloader maybe exists. If it is not
|
||||
// the case, the class will not be found
|
||||
}
|
||||
$obj = new $viewClass;
|
||||
$resView = $obj->$viewMethod ($data, $variable);
|
||||
|
||||
Reference in New Issue
Block a user