Update footer.php

This commit is contained in:
FusionPBX 2019-11-23 15:26:34 -07:00 committed by GitHub
parent ba36f1328d
commit ffded121e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -45,7 +45,7 @@
}
//set a default template
if (strlen($_SESSION["template_content"]) == 0) { //build template if session template has no length
if (strlen($_SESSION["template_full_path"]) == 0) { //build template if session template has no length
$template_base_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
if (strlen($template_rss_sub_category) > 0) {
//this template was assigned by the content manager
@ -55,8 +55,7 @@
$_SESSION['domain']['template']['name'] = 'default';
$template_full_path = $template_base_path.'/default/template.php';
}
$template = file_get_contents($template_full_path);
$_SESSION["template_content"] = $template;
$_SESSION["template_full_path"] = $template_full_path;
}
else {
//get the contents of the template and save it to the template variable
@ -65,17 +64,17 @@
$_SESSION['domain']['template']['name'] = 'default';
$template_full_path = $template_base_path.'/default/template.php';
}
$template = file_get_contents($template_full_path);
$_SESSION["template_content"] = $template;
$_SESSION["template_full_path"] = $template_full_path;
}
}
//get the template
$template_full_path = $_SESSION["template_full_path"];
ob_start();
$template = $_SESSION["template_content"];
eval('?>' . $template . '<?php ');
include($template_full_path);
$template = ob_get_contents(); //get the output from the buffer
ob_end_clean(); //clean the buffer
$_SESSION["template_content"] = $template;
//prepare the template to display the output
$custom_head = '';