2
0
forked from Wavyzz/dolibarr

Fix module website

This commit is contained in:
Laurent Destailleur
2017-12-12 01:40:34 +01:00
parent 48aada6090
commit 9880ef7364
6 changed files with 61 additions and 55 deletions

View File

@@ -160,17 +160,20 @@ function dolWebsiteSaveContent($content)
* Clean an HTML page to report only content, so we can include it into another page.
* It outputs content of file sanitized from html and body part.
*
* @param string $contentfile Path to file to include (must include website root. Example: 'mywebsite/mypage.php')
* @param string $containeralias Path to file to include (must be a page from website root. Example: 'mypage.php' means 'mywebsite/mypage.php')
* @return void
*/
function dolIncludeHtmlContent($contentfile)
function includeContainer($containeralias)
{
global $conf, $db, $langs, $mysoc, $user, $website;
global $includehtmlcontentopened;
global $websitekey;
$MAXLEVEL=20;
$fullpathfile=DOL_DATA_ROOT.'/website/'.$contentfile;
if (! preg_match('/\.php$/i', $containeralias)) $containeralias.='.php';
$fullpathfile=DOL_DATA_ROOT.'/website/'.$websitekey.'/'.$containeralias;
if (empty($includehtmlcontentopened)) $includehtmlcontentopened=0;
$includehtmlcontentopened++;
@@ -193,7 +196,7 @@ function dolIncludeHtmlContent($contentfile)
if (! $res)
{
print 'ERROR: FAILED TO INCLUDE PAGE '.$contentfile.".\n";
print 'ERROR: FAILED TO INCLUDE PAGE '.$containeralias.".\n";
}
$includehtmlcontentopened--;