diff --git a/main/inc/lib/javascript/chat/video.php b/main/inc/lib/javascript/chat/video.php index a74097030c..729d07b9a7 100644 --- a/main/inc/lib/javascript/chat/video.php +++ b/main/inc/lib/javascript/chat/video.php @@ -44,7 +44,8 @@ $template->assign('chat_user', $chatUser); $template->assign('user_local', $userLocal); $template->assign('block_friends', $friend_html); -$content = $template->fetch('default/chat/video.tpl'); +$tpl = $template->get_template('chat/video.tpl'); +$content = $template->fetch($tpl); $templateHeader = Display::returnFontAwesomeIcon('video-camera', 'lg', true) . $chatVideo->getRoomName(); diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index b43248bdbb..a3acd15a9a 100755 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -730,7 +730,8 @@ class Template // Loading email_editor js if (!api_is_anonymous() && api_get_setting('allow_email_editor') == 'true') { - $js_file_to_string .= $this->fetch('default/mail_editor/email_link.js.tpl'); + $template = $this->get_template('mail_editor/email_link.js.tpl'); + $js_file_to_string .= $this->fetch($template); } if (!$disable_js_and_css_files) { diff --git a/main/lp/lp_add_audio.php b/main/lp/lp_add_audio.php index 64fbd6cc67..5f824691ec 100755 --- a/main/lp/lp_add_audio.php +++ b/main/lp/lp_add_audio.php @@ -122,7 +122,8 @@ $tpl->assign('enable_record_audio', api_get_setting('enable_record_audio') === ' $tpl->assign('cur_dir_path', '/audio'); $tpl->assign('lp_item_id', $lp_item_id); $tpl->assign('lp_dir', api_remove_trailing_slash($lpPathInfo['dir'])); -$recordVoiceForm .= $tpl->fetch('default/learnpath/record_voice.tpl'); +$template = $tpl->get_template('learnpath/record_voice.tpl'); +$recordVoiceForm .= $tpl->fetch($template); $form->addElement('header', get_lang('Or')); $form->addElement('header', get_lang('AudioFile')); $form->addLabel(null, sprintf(get_lang('AudioFileForItemX'), $lp_item->get_title())); @@ -163,5 +164,6 @@ $page .= ''; $page .= ''; $tpl->assign('content', $page); -$content = $tpl->fetch('default/learnpath/lp_upload_audio.tpl'); +$template = $tpl->get_template('learnpath/lp_upload_audio.tpl'); +$content = $tpl->fetch($template); $tpl->display_one_col_template(); diff --git a/main/social/myfiles.php b/main/social/myfiles.php index ef564eb9a1..646091fc6b 100755 --- a/main/social/myfiles.php +++ b/main/social/myfiles.php @@ -110,7 +110,8 @@ $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('MyFiles')); $tpl = new Template(); SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'myfiles'); $editor = new \Chamilo\CoreBundle\Component\Editor\Editor(); -$editor = $tpl->fetch('default/'.$editor->getEditorStandAloneTemplate()); +$template = $tpl->get_template($editor->getEditorStandAloneTemplate()); +$editor = $tpl->fetch($template); $tpl->assign('show_media_element', 0); diff --git a/main/social/profile.php b/main/social/profile.php index e4fd64daca..bb8f0ecbb3 100755 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -702,7 +702,8 @@ $tpl->assign('social_auto_extend_link', $socialAutoExtendLink); $formModalTpl = new Template(); $formModalTpl->assign('invitation_form', MessageManager::generate_invitation_form('send_invitation')); -$formModals = $formModalTpl->fetch('default/social/form_modals.tpl'); +$template = $formModalTpl->get_template('social/form_modals.tpl'); +$formModals = $formModalTpl->fetch($template); $tpl->assign('form_modals', $formModals); $social_layout = $tpl->get_template('social/profile.tpl'); diff --git a/main/social/search.php b/main/social/search.php index bae939ef2f..bc4a4a0a18 100755 --- a/main/social/search.php +++ b/main/social/search.php @@ -242,7 +242,8 @@ $tpl->assign('search_form', $searchForm); $formModalTpl = new Template(); $formModalTpl->assign('invitation_form', MessageManager::generate_invitation_form('send_invitation')); -$formModals = $formModalTpl->fetch('default/social/form_modals.tpl'); +$template = $formModalTpl->get_template('social/form_modals.tpl'); +$formModals = $formModalTpl->fetch($template); $tpl->assign('form_modals', $formModals); diff --git a/main/social/skills_ranking.php b/main/social/skills_ranking.php index b9522dcc7a..50e3b8f448 100755 --- a/main/social/skills_ranking.php +++ b/main/social/skills_ranking.php @@ -96,7 +96,8 @@ $content = Display::grid_html('skill_ranking'); $tpl = new Template(get_lang('Ranking')); $tpl->assign('jqgrid_html', $jqgrid); -$content .= $tpl->fetch('default/skill/skill_ranking.tpl'); +$template = $tpl->get_template('skill/skill_ranking.tpl'); +$content .= $tpl->fetch($template); $tpl->assign('content', $content); $tpl->display_one_col_template(); diff --git a/main/social/skills_tree.php b/main/social/skills_tree.php index a36da86d57..e9d5ac9a6d 100755 --- a/main/social/skills_tree.php +++ b/main/social/skills_tree.php @@ -33,6 +33,7 @@ $tpl = new Template(null, false, false); $tpl->assign('url', $url); $tpl->assign('skill_visualizer', $skill_visualizer); -$content = $tpl->fetch('default/skill/skill_tree_student.tpl'); +$template = $tpl->get_template('skill/skill_tree_student.tpl'); +$content = $tpl->fetch($template); $tpl->assign('content', $content); $tpl->display_no_layout_template(); diff --git a/main/social/skills_wheel.php b/main/social/skills_wheel.php index b207a9c760..7074ff94a7 100755 --- a/main/social/skills_wheel.php +++ b/main/social/skills_wheel.php @@ -64,6 +64,7 @@ $tpl->assign('user_info', $userInfo); $tpl->assign('ranking', $ranking); $tpl->assign('skills', $skills); -$content = $tpl->fetch('default/skill/skill_wheel_student.tpl'); +$template = $tpl->get_template('skill/skill_tree_student.tpl'); +$content = $tpl->fetch($template); $tpl->assign('content', $content); $tpl->display_no_layout_template();