sci2tech Wrote:
Code:
function gen_page_awstats($tpl) {
global $cfg;
$awstats_act = $cfg['AWSTATS_ACTIVE'];
if ($awstats_act != 'yes') {
$tpl->assign('ACTIVE_AWSTATS', '');
} else {
$tpl->assign(
array(
'AWSTATS_PATH' => 'http://' . $_SESSION['user_logged'] . '/stats/',
'AWSTATS_TARGET' => '_blank'
)
);
}
}
The bug is here. If awstats is dynanic AWSTATS_PATH is never defined hence never substituted in the template. Maybe a bug in the template (but since I'd move this logic to the php file I'd modify it to define a corrent AWSTATS_PATH).
sci2tech Wrote:BTW: It`s the same function in all that file 
Yes... like I said in the past. Whoever coded this mess has been paid by the line of code and not for quality.


Good luck. I think you nailed down the problem correctly.
ADDED: However a little more debugging on my platform shows that AWSTATS_PATH is set correctly.
The problem is in the declaration of the function where $tpl is passed as value. It must be passed as reference:
Code:
function gen_page_awstats(&$tpl) {
....
I tested and it works
You can attach the patch to the ticket as you're the one who found it
ispcomm.