From 7a1f5e932adf3ef81b2b90f313c2d6e2ab617c67 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 26 Sep 2008 11:24:52 +0000 Subject: [PATCH] MDL-16706 - eliminate miscellaneous inine JavaScript A few easy files in lib. --- lib/filelib.php | 2 +- lib/moodlelib.php | 5 +++-- lib/recaptchalib.php | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/filelib.php b/lib/filelib.php index dfc45f7af9..af1f295f90 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -1543,7 +1543,7 @@ function file_modify_html_header($text) { $filters = explode(",", $CFG->textfilters); if (in_array('filter/mediaplugin', $filters)) { // this script is needed by most media filter plugins. - $ufo = "\n".''."\n"; + $ufo = get_require_js_code(array($CFG->wwwroot . '/lib/ufo.js')); } else { $ufo = ''; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 26782d3d33..71d0a29abe 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -7520,8 +7520,9 @@ function message_popup_window() { if (get_user_preferences('message_showmessagewindow', 1) == 1) { if ($DB->count_records_select('message', 'useridto = ? AND timecreated > ?', array($USER->id, $USER->message_lastpopup))) { $USER->message_lastpopup = time(); - return '"; + return print_js_call('openpopup', array('/message/index.php', 'message', + 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', + 0), true); } } } diff --git a/lib/recaptchalib.php b/lib/recaptchalib.php index baad668883..bebabe0dd3 100644 --- a/lib/recaptchalib.php +++ b/lib/recaptchalib.php @@ -134,12 +134,12 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { $strgetanothercaptcha = get_string('getanothercaptcha', 'auth'); $strgetanaudiocaptcha = get_string('getanaudiocaptcha', 'auth'); $strgetanimagecaptcha = get_string('getanimagecaptcha', 'auth'); - - $return = ' -