diff options
Diffstat (limited to 'inc/template.php')
| -rw-r--r-- | inc/template.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php index e966a057..f9d59c2a 100644 --- a/inc/template.php +++ b/inc/template.php @@ -168,13 +168,17 @@ }
function Element($templateFile, array $options) {
- global $config;
+ global $config, $debug;
// Small little hack to add the PM system
- if(function_exists('create_pm_header') && (@$options['mod'] || @$options['__mod'])) {
+ if(function_exists('create_pm_header') && (isset($options['mod']) || isset($options['__mod']))) {
$options['pm'] = create_pm_header();
}
+ if(isset($options['body']) && $config['debug']) {
+ $options['body'] .= '<h3>Debug</h3><pre style="white-space: pre-wrap;font-size: 10px;">' . print_r($debug, true) . '</pre><hr/>';
+ }
+
// Read the template file
if($template = @file_get_contents("{$config['dir']['template']}/${templateFile}")) {
return templateParse($template, $options, null, $templateFile);
|
