Permalink
Browse files

blog theme: fix config template loading

  • Loading branch information...
1 parent df31cd6 commit ebe93fbbea565dcc1a4ea69559f083215defddfa @fabrixxm committed Feb 18, 2013
Showing with 11 additions and 2 deletions.
  1. +11 −2 view/theme/blog/config.php
View
@@ -49,8 +49,17 @@ function blogtheme_form(&$a, $headimg, $headimghome){
".wheel.jpg" => "wheel.jpg",
);
-
- $t = get_markup_template("config.tpl" );
+
+ // get_markup_template() load templates from current enabled theme
+ // if this theme is not the current one, it will fail
+ $template = dirname(__file__)."/smarty3/config.tpl";
+ if($a->theme['template_engine'] === 'smarty3') {
+ $t = new FriendicaSmarty();
+ $t->filename = $template;
+ } else {
+ $t = get_markup_template( $template );
+ }
+
$o .= replace_macros($t, array(
'$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(),

0 comments on commit ebe93fb

Please sign in to comment.