From 7b1c81d91729e0d690f885d851c1bd70c0f5e5d6 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 20 Mar 2015 14:30:58 +0000 Subject: [PATCH] outputhtml : Don't generate an error when the layout is provided in the variable git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2034 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- outputhtml.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/outputhtml.php b/outputhtml.php index 06244fd..e5a2f69 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -76,9 +76,11 @@ class outputhtml extends output @return string the Layout with variables interpreted */ private function layoutVariables ($layout, $variables) { + // The layout can be a external layout file or the HTML page itself. + // FIXME : Allow to manage variables in a layout provided in the variable, + // without eval use if (! file_exists ($layout)) - throw new Exception (sprintf (_("Layout File '%s' does not exists"), - $layout), 404); + return $layout; extract ($variables); ob_start(); require ($layout);