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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user