Do the replacement at the end (to update {baseurl} if it is set by the {javascript}
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4714 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -87,12 +87,6 @@ class outputhtml extends output
|
|||||||
EOT;
|
EOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do the title replacement in the replacement structure
|
|
||||||
if (! isset ($replacement["{flash}"]))
|
|
||||||
$replacement["{flash}"] = "";
|
|
||||||
foreach ($replacement as $key=>$val)
|
|
||||||
$layoutPage = str_replace ($key, $val, $layoutPage);
|
|
||||||
|
|
||||||
// All the entries coming from views in array are substitute in layout
|
// All the entries coming from views in array are substitute in layout
|
||||||
// {content}, {title}
|
// {content}, {title}
|
||||||
if (is_array ($resView))
|
if (is_array ($resView))
|
||||||
@@ -105,6 +99,12 @@ EOT;
|
|||||||
else
|
else
|
||||||
$layoutPage = str_replace ("{content}", $resView, $layoutPage);
|
$layoutPage = str_replace ("{content}", $resView, $layoutPage);
|
||||||
|
|
||||||
|
// Do the title replacement in the replacement structure
|
||||||
|
if (! isset ($replacement["{flash}"]))
|
||||||
|
$replacement["{flash}"] = "";
|
||||||
|
foreach ($replacement as $key=>$val)
|
||||||
|
$layoutPage = str_replace ($key, $val, $layoutPage);
|
||||||
|
|
||||||
// Remove the not used {XXX}
|
// Remove the not used {XXX}
|
||||||
$layoutPage = preg_replace ("~({\S+})~", "", $layoutPage);
|
$layoutPage = preg_replace ("~({\S+})~", "", $layoutPage);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user