From 222e895fffe8eefe35aea7b0de1f799152909de8 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 23 May 2012 14:43:35 +0200 Subject: [PATCH] Fixing favicon when previewing certificates see BT#4318 --- main/document/document.php | 6 ++---- main/inc/lib/template.lib.php | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main/document/document.php b/main/document/document.php index 54db4672e9..c217247643 100644 --- a/main/document/document.php +++ b/main/document/document.php @@ -43,7 +43,6 @@ require_once 'document.inc.php'; $lib_path = api_get_path(LIBRARY_PATH); /* Libraries */ -require_once $lib_path.'document.lib.php'; require_once $lib_path.'fileUpload.lib.php'; require_once $lib_path.'fileDisplay.lib.php'; //require_once $lib_path.'tablesort.lib.php';moved to autoload @@ -317,15 +316,14 @@ if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' && isse $content_html = DocumentManager::replace_user_info_into_html(api_get_user_id(), api_get_course_id(), true); $new_content_html = $content_html['content']; - $path_image = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/images/gallery'; $new_content_html = str_replace('../images/gallery', $path_image, $new_content_html); $path_image_in_default_course = api_get_path(WEB_CODE_PATH).'default_course_document'; $new_content_html = str_replace('/main/default_course_document', $path_image_in_default_course, $new_content_html); - $new_content_html = str_replace('/main/img/', api_get_path(WEB_IMG_PATH), $new_content_html); - echo ''; + Display::display_reduced_header(); + echo ''; echo '' . get_lang('Print') . ' ' . get_lang('Print') . ''; print_r($new_content_html); exit; diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index 8ae0e363eb..e4b17cb80e 100644 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -496,6 +496,7 @@ class Template { $this->assign('extra_headers', $extra_headers); $favico = ''; + if (isset($_configuration['multiple_access_urls']) && $_configuration['multiple_access_urls']) { $access_url_id = api_get_current_access_url_id(); if ($access_url_id != -1) { @@ -505,7 +506,7 @@ class Template { $clean_url = str_replace('/', '-', $clean_url); $clean_url .= '/'; $homep = api_get_path(REL_PATH).'home/'.$clean_url; //homep for Home Path - $icon_real_homep = api_get_path(SYS_PATH).'home/'.$clean_url; + $icon_real_homep = api_get_path(SYS_PATH).'home/'.$clean_url; //we create the new dir for the new sites if (is_file($icon_real_homep.'favicon.ico')) {