From 7ef00c046f170d67c975531a7cd2c8859b0ad60d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 20 Nov 2014 20:04:14 +0000 Subject: [PATCH] outputhtml : Add module support git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1875 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- outputhtml.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/outputhtml.php b/outputhtml.php index 55f5984..06244fd 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -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))