From 789f51aba83242717166533628e55ccabb2710a6 Mon Sep 17 00:00:00 2001 From: ywarnier Date: Thu, 10 Feb 2011 00:09:18 -0500 Subject: [PATCH] Added possibility to use own favicon.ico for every site of a multiple access urls install (closes #1739) --- main/inc/header.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main/inc/header.inc.php b/main/inc/header.inc.php index 6d7806d0ed..507880fb9d 100755 --- a/main/inc/header.inc.php +++ b/main/inc/header.inc.php @@ -176,6 +176,22 @@ if (isset($htmlIncHeadXtra) && $htmlIncHeadXtra) { } // The following include might be subject to a setting proper to the course or platform. include api_get_path(LIBRARY_PATH).'javascript/email_links.lib.js.php'; + +if ($_configuration['multiple_access_urls']) { + $access_url_id = api_get_current_access_url_id(); + if ($access_url_id != -1) { + $url_info = api_get_access_url($access_url_id); + $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url'])); + $clean_url = replace_dangerous_char($url); + $clean_url = str_replace('/', '-', $clean_url); + $clean_url .= '/'; + $homep = api_get_path(REL_PATH).'home/'.$clean_url; //homep for Home Path + //we create the new dir for the new sites + if (!is_file($homep.'favicon.ico')) { + echo ''; + } + } +} ?>