Fix generation of tpl
This commit is contained in:
parent
a4a4b8ddff
commit
016bc6851b
@ -614,7 +614,7 @@ function dolSavePageContent($filetpl, $object, $objectpage)
|
|||||||
$tplcontent.= '<meta name="description" content="'.dol_string_nohtmltag($objectpage->description, 0, 'UTF-8').'" />'."\n";
|
$tplcontent.= '<meta name="description" content="'.dol_string_nohtmltag($objectpage->description, 0, 'UTF-8').'" />'."\n";
|
||||||
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.' '.DOL_VERSION.' (https://www.dolibarr.org)" />'."\n";
|
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.' '.DOL_VERSION.' (https://www.dolibarr.org)" />'."\n";
|
||||||
$tplcontent.= '<!-- Include link to CSS file -->'."\n";
|
$tplcontent.= '<!-- Include link to CSS file -->'."\n";
|
||||||
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?websiteid='.$object->id.'" type="text/css" />'."\n";
|
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />'."\n";
|
||||||
$tplcontent.= '<!-- Include HTML header from common file -->'."\n";
|
$tplcontent.= '<!-- Include HTML header from common file -->'."\n";
|
||||||
$tplcontent.= '<?php print preg_replace(\'/<\/?html>/ims\', \'\', file_get_contents(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")); ?>'."\n";
|
$tplcontent.= '<?php print preg_replace(\'/<\/?html>/ims\', \'\', file_get_contents(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")); ?>'."\n";
|
||||||
$tplcontent.= '<!-- Include HTML header from page header block -->'."\n";
|
$tplcontent.= '<!-- Include HTML header from page header block -->'."\n";
|
||||||
|
|||||||
@ -85,7 +85,7 @@ if (empty($pageid))
|
|||||||
$objectpage=new WebsitePage($db);
|
$objectpage=new WebsitePage($db);
|
||||||
$array=$objectpage->fetchAll($object->id);
|
$array=$objectpage->fetchAll($object->id);
|
||||||
|
|
||||||
if (count($array) > 0)
|
if (is_array($array) && count($array) > 0)
|
||||||
{
|
{
|
||||||
$firstrep=reset($array);
|
$firstrep=reset($array);
|
||||||
$pageid=$firstrep->id;
|
$pageid=$firstrep->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user