From 268ddd5070554dd9342c619eb6db4d8203162975 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 19 Mar 2007 04:26:45 +0000 Subject: [PATCH] MDL-8860 - Enabled multilang filter for site title. --- index.php | 2 +- lib/rsslib.php | 4 ++-- lib/uploadlib.php | 2 +- lib/weblib.php | 8 ++++---- mod/resource/type/file/resource.class.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index cd1b5d84b9..1053234f3f 100644 --- a/index.php +++ b/index.php @@ -102,7 +102,7 @@ $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), BLOCK_R_MAX_WIDTH); - print_header(strip_tags($SITE->fullname), $SITE->fullname, 'home', '', + print_header($SITE->fullname, $SITE->fullname, 'home', '', '', true, '', user_login_string($SITE).$langmenu); diff --git a/lib/rsslib.php b/lib/rsslib.php index 37406ef65b..58e982347e 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -145,7 +145,7 @@ function rss_standard_header($title = NULL, $link = NULL, $description = NULL) { //Calculate title, link and description if (empty($title)) { - $title = $site->fullname; + $title = format_string($site->fullname); } if (empty($link)) { $link = $CFG->wwwroot; @@ -170,7 +170,7 @@ function rss_standard_header($title = NULL, $link = NULL, $description = NULL) { $result .= rss_full_tag('language', 2, false, substr($USER->lang,0,2)); } $today = getdate(); - $result .= rss_full_tag('copyright', 2, false, '© '. $today['year'] .' '. $site->fullname); + $result .= rss_full_tag('copyright', 2, false, '© '. $today['year'] .' '. format_string($site->fullname)); /* if (!empty($USER->email)) { $result .= rss_full_tag('managingEditor', 2, false, fullname($USER)); diff --git a/lib/uploadlib.php b/lib/uploadlib.php index 06d7691bda..a67b372c13 100644 --- a/lib/uploadlib.php +++ b/lib/uploadlib.php @@ -674,7 +674,7 @@ function clam_mail_admins($notice) { $site = get_site(); - $subject = get_string('clamemailsubject', 'moodle', $site->fullname); + $subject = get_string('clamemailsubject', 'moodle', format_string($site->fullname)); $admins = get_admins(); foreach ($admins as $admin) { email_to_user($admin, get_admin(), $subject, $notice); diff --git a/lib/weblib.php b/lib/weblib.php index cef75867dc..cd800d3bc9 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1381,7 +1381,7 @@ function format_string ($string, $striplinks=true, $courseid=NULL ) { if ($strcache === false or count($strcache) > 2000 ) { // this number might need some tuning to limit memory usage in cron $strcache = array(); } - + //init course id if (empty($courseid)) { $courseid = $COURSE->id; @@ -1397,11 +1397,11 @@ function format_string ($string, $striplinks=true, $courseid=NULL ) { // First replace all ampersands not followed by html entity code $string = preg_replace("/\&(?![a-z0-9#]{1,8};)/", "&", $string); - + if (!empty($CFG->filterall)) { $string = filter_string($string, $courseid); } - + // If the site requires it, strip ALL tags from this string if (!empty($CFG->formatstringstriptags)) { $string = strip_tags($string); @@ -2233,7 +2233,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='', // Clean up the title - $title = strip_tags(format_string($title)); // fix for MDL-8582 + $title = format_string($title); // fix for MDL-8582 $title = str_replace('"', '"', $title); // Create class and id for this page diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 7d31f6399c..4dc4049b67 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -65,7 +65,7 @@ function set_parameters() { 'lang' => array('langstr' => get_string('preferredlanguage'), 'value' => current_language()), 'sitename' => array('langstr' => get_string('fullsitename'), - 'value' => $site->fullname), + 'value' => format_string($site->fullname)), 'serverurl' => array('langstr' => get_string('serverurl', 'resource', $CFG), 'value' => $CFG->wwwroot), 'currenttime' => array('langstr' => get_string('time'), -- 2.39.5