Website module

This commit is contained in:
Laurent Destailleur 2018-07-24 01:10:38 +02:00
parent 174394c476
commit a1bdc6022d
2 changed files with 16 additions and 0 deletions

View File

@ -48,6 +48,10 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0)
if ($removephppart) $replacewith='';
$content = preg_replace('/"mailto:<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
$replacewith='src="php';
if ($removephppart) $replacewith='';
$content = preg_replace('/src="<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
$replacewith='<span class="phptag">...php...</span>';
if ($removephppart) $replacewith='';
$content = preg_replace('/<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);

View File

@ -2319,6 +2319,10 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
{
if ($pageid > 0)
{
// $filejs
// $filecss
// $filephp
// Ouput page under the Dolibarr top menu
$objectpage->fetch($pageid);
$jscontent = @file_get_contents($filejs);
@ -2380,6 +2384,14 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
}
/*
$filephp = $objectpage->
ob_start();
include $filephp;
$newcontent = ob_get_contents();
ob_end_clean();
*/
$out.=dolWebsiteReplacementOfLinks($object, $newcontent)."\n";
$out.='</div>';