2
0
forked from Wavyzz/dolibarr

Debug module website

This commit is contained in:
Laurent Destailleur
2017-07-21 02:36:10 +02:00
parent 522f21e528
commit 302ee97d31
3 changed files with 10 additions and 7 deletions

View File

@@ -62,8 +62,9 @@ function dolWebsiteOutput($content)
{
global $website;
// Replace relative link with dolibarr URL
// Replace relative link / with dolibarr URL
$content=preg_replace('/(href=")\/\"/', '\1'.DOL_URL_ROOT.'/public/websites/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'"', $content, -1, $nbrep);
// Replace relative link /xxx.php with dolibarr URL
$content=preg_replace('/(href=")\/?([^\"]*)(\.php\")/', '\1'.DOL_URL_ROOT.'/public/websites/index.php?website='.$website->ref.'&pageref=\2"', $content, -1, $nbrep);
}