diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-25 18:01:46 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-25 18:01:46 -0400 |
commit | d0baab6978f1959382d568d26cc9f8f552a7b764 (patch) | |
tree | 32bbe1148e86bb7846ae1f0e581c0f3c0f68956f /plugins/TemplatePlugin.php | |
parent | 077955cb1d45f866d65aebdc42f5e3e71dc74045 (diff) | |
parent | a2117961be463d566c8f3c6ccd9b8e840f171804 (diff) |
Merge branch '0.8.x' into testing
Diffstat (limited to 'plugins/TemplatePlugin.php')
-rw-r--r-- | plugins/TemplatePlugin.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TemplatePlugin.php b/plugins/TemplatePlugin.php index 03daf6219..6c14f1988 100644 --- a/plugins/TemplatePlugin.php +++ b/plugins/TemplatePlugin.php @@ -198,13 +198,13 @@ class TemplatePlugin extends Plugin { // unless laconica config: // $config['template']['mode'] = 'html'; if (!(common_config('template', 'mode') == 'html')) { - $tpl_file = 'tpl/index.php'; + $tpl_file = $this->templateFolder() . '/index.php'; $tags = array_merge($vars,$this->blocks); include $tpl_file; return; } - $tpl_file = 'tpl/index.html'; + $tpl_file = $this->templateFolder() . '/index.html'; // read the static template $output = file_get_contents( $tpl_file ); @@ -236,6 +236,9 @@ class TemplatePlugin extends Plugin { return true; } + function templateFolder() { + return 'tpl'; + } // catching the StartShowHTML event to halt the rendering function onStartShowHTML( &$act ) { @@ -300,7 +303,7 @@ class TemplateAction extends Action $this->clientError(_('only User #1 can update the template'), $code = 401); // open the old template - $tpl_file = 'tpl/index.html'; + $tpl_file = $this->templateFolder() . '/index.html'; $fp = fopen( $tpl_file, 'w+' ); // overwrite with the new template |