outputhtml : Add module support

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1875 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-11-20 20:04:14 +00:00
parent a9295d0fe5
commit 7ef00c046f

View File

@@ -22,7 +22,7 @@ class outputhtml extends output
public function out ($data, $title = FALSE,
$viewClass = FALSE, $viewMethod = FALSE,
$layout = FALSE, $replacement = array(),
$variable = array ())
$variable = array (), $module = "")
{
@header("Cache-Control: no-store, no-cache, must-revalidate");
@header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
@@ -33,7 +33,10 @@ class outputhtml extends output
$resView = $data;
if ($viewClass !== FALSE && $viewMethod !== FALSE)
{
require_once ("views/$viewClass.php");
if ($module !== "")
require_once ("modules/$module/views/$viewClass.php");
else
require_once ("views/$viewClass.php");
$obj = new $viewClass;
$resView = $obj->$viewMethod ($data, $variable);
if (is_array ($resView))