Fix use of wrong template caused by hardcoded path

pull/2487/head
Yannick Warnier 9 years ago
parent 9dd6c390b8
commit 01c5c4a48a
  1. 3
      main/inc/lib/javascript/chat/video.php
  2. 3
      main/inc/lib/template.lib.php
  3. 6
      main/lp/lp_add_audio.php
  4. 3
      main/social/myfiles.php
  5. 3
      main/social/profile.php
  6. 3
      main/social/search.php
  7. 3
      main/social/skills_ranking.php
  8. 3
      main/social/skills_tree.php
  9. 3
      main/social/skills_wheel.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();

@ -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) {

@ -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 .= '</div>';
$page .= '</div>';
$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();

@ -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);

@ -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');

@ -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);

@ -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();

@ -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();

@ -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();

Loading…
Cancel
Save