Commit 17efa4c1 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

allow javascript for analyses

parent e2f2c88b
This diff is collapsed.
This diff is collapsed.
...@@ -317,8 +317,14 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -317,8 +317,14 @@ class tx_nG6_pi1 extends tslib_pibase {
$smarty->assign('llang', $this->LOCAL_LANG['default']); $smarty->assign('llang', $this->LOCAL_LANG['default']);
} }
// Try to process the analyse template // Try to process the analyse template
try { return $smarty->fetch($analyse['class'].'.tpl'); } try {
catch (Exception $e) { return str_replace(array('###ANALYSE_CLASS###'), array($analyse['class']), $this->pi_getLL('no_template_found','[no_template_found:###ANALYSE_CLASS###]')); } if (file_exists(t3lib_extMgm::extPath($this->extKey).'pi1/analyzes/'.$analyse['class'].'.js')) {
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] .= '<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'pi1/analyzes/'.$analyse['class'].'.js"></script>'
}
return $smarty->fetch($analyse['class'].'.tpl');
} catch (Exception $e) {
return str_replace(array('###ANALYSE_CLASS###'), array($analyse['class']), $this->pi_getLL('no_template_found','[no_template_found:###ANALYSE_CLASS###]'));
}
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment