Enhance logs
This commit is contained in:
parent
277a693c16
commit
7891c8d856
@ -29,14 +29,15 @@
|
|||||||
* @param Website $website Web site object
|
* @param Website $website Web site object
|
||||||
* @param string $content Content to replace
|
* @param string $content Content to replace
|
||||||
* @param int $removephppart 0=Replace PHP sections with a PHP badge. 1=Remove completely PHP sections.
|
* @param int $removephppart 0=Replace PHP sections with a PHP badge. 1=Remove completely PHP sections.
|
||||||
|
* @param string $contenttype Content type
|
||||||
* @return boolean True if OK
|
* @return boolean True if OK
|
||||||
* @see dolWebsiteOutput() for function used to replace content in a web server context
|
* @see dolWebsiteOutput() for function used to replace content in a web server context
|
||||||
*/
|
*/
|
||||||
function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0)
|
function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $contenttype='html')
|
||||||
{
|
{
|
||||||
$nbrep = 0;
|
$nbrep = 0;
|
||||||
|
|
||||||
dol_syslog('dolWebsiteReplacementOfLinks start', LOG_DEBUG);
|
dol_syslog('dolWebsiteReplacementOfLinks start (contenttype='.$contenttype." USEDOLIBARRSERVER=".(defined('USEDOLIBARRSERVER')?'1':'')." USEDOLIBARREDITOR=".(defined('USEDOLIBARREDITOR')?'1':'').')', LOG_DEBUG);
|
||||||
|
|
||||||
// Replace php code. Note $content may come from database and does not contains body tags.
|
// Replace php code. Note $content may come from database and does not contains body tags.
|
||||||
$replacewith='...php...';
|
$replacewith='...php...';
|
||||||
|
|||||||
@ -3154,7 +3154,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
}*/
|
}*/
|
||||||
$out.="\n<html><head>\n";
|
$out.="\n<html><head>\n";
|
||||||
$out.="<!-- htmlheader/style of page from database -->\n";
|
$out.="<!-- htmlheader/style of page from database -->\n";
|
||||||
$out.=dolWebsiteReplacementOfLinks($object, $objectpage->htmlheader, 1);
|
$out.=dolWebsiteReplacementOfLinks($object, $objectpage->htmlheader, 1, 'htmlheader');
|
||||||
$out.="</head>\n";
|
$out.="</head>\n";
|
||||||
$out.="\n<body>";
|
$out.="\n<body>";
|
||||||
|
|
||||||
@ -3172,7 +3172,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
include $filecss;
|
include $filecss;
|
||||||
$csscontent = ob_get_contents();
|
$csscontent = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$tmpout.= dolWebsiteReplacementOfLinks($object, $csscontent, 1);
|
$tmpout.= dolWebsiteReplacementOfLinks($object, $csscontent, 1, 'css');
|
||||||
$tmpout.= '/* Include style from the HTML header of page */'."\n";
|
$tmpout.= '/* Include style from the HTML header of page */'."\n";
|
||||||
// Clean the html header of page to get only <style> content
|
// Clean the html header of page to get only <style> content
|
||||||
$tmp = preg_split('(<style[^>]*>|</style>)', $objectpage->htmlheader);
|
$tmp = preg_split('(<style[^>]*>|</style>)', $objectpage->htmlheader);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user