From eb71a171345f2c9f26affb8431706382082af781 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 23 Feb 2011 17:26:21 +0100 Subject: [PATCH] Replacing course official code to course name in html title tag --- main/course_home/course_home.php | 4 +--- main/inc/header.inc.php | 30 ++++++++++++++++++------------ main/session/index.php | 2 +- main/social/home.php | 2 +- main/social/profile.php | 1 + 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/main/course_home/course_home.php b/main/course_home/course_home.php index 0291d35525..a5313128b7 100755 --- a/main/course_home/course_home.php +++ b/main/course_home/course_home.php @@ -240,9 +240,7 @@ if (!empty($auto_lunch)) { } } -//Display::display_header($course_title, 'Home'); -Display::display_header('', get_lang('Home')); - +Display::display_header(null, 'Home'); $tool_table = Database::get_course_table(TABLE_TOOL_LIST); diff --git a/main/inc/header.inc.php b/main/inc/header.inc.php index 228a25281d..f2dea57cdb 100755 --- a/main/inc/header.inc.php +++ b/main/inc/header.inc.php @@ -48,6 +48,23 @@ if (isset($httpHeadXtra) && $httpHeadXtra) { // Get language iso-code for this page - ignore errors $document_language = api_get_language_isocode(); +$course_title = $_course['name']; +$title_list[] = api_get_setting('siteName'); +if (!empty($course_title)) { + $title_list[] = $course_title; +} +if ($nameTools != '') { + $title_list[] = $nameTools; +} + +$title_string = ''; +for($i=0; $i <?php -$title_list[] = api_get_setting('siteName'); -$title_list[] = $nameTools; -$title_list[] = $_course['official_code']; -$title_string = ''; - -for($i=0; $i<count($title_list);$i++) { - $title_string .=$title_list[$i]; - if (isset($title_list[$i+1])) { - $title_string .=' - '; - } -} -echo $title_string; +echo Security::remove_XSS($title_string); ?>