From 47932f4967f490265dc3fa67c30c74d141cf7c97 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 15 Jan 2012 15:24:34 +0100 Subject: [PATCH] MDL-30958 do not use Yahoo CDN on https sites Browsers do not like mixing of ssl and non-use content on one page. Unfortunately YAHOO does not provide the files over SSL yet - see http://yuilibrary.com/yui/docs/tutorials/faq/#does-yahoos-cdn-support-ssl --- lang/en/admin.php | 2 +- lib/outputrequirementslib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en/admin.php b/lang/en/admin.php index ba6d8f7e229..eae32f878b2 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -330,7 +330,7 @@ For example: standard,orangewhite.'; $string['configtimezone'] = 'You can set the default timezone here. This is the only the DEFAULT timezone for displaying dates - each user can override this by setting their own in their profile. "Server time" here will make Moodle default to the server\'s operating system setting, but "Server time" in the user profile will make the user default to this timezone setting. Cronjobs that depend on a time of day to run will use this timezone.'; $string['configunzip'] = 'Indicate the location of your unzip program (Unix only, optional). If specified, this will be used to unpack zip archives on the server. If you leave this blank, then Moodle will use internal routines.'; $string['configuseblogassociations'] = 'Should users be able to organize their blog by associating entries with courses and course modules?'; -$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo‘s servers. WARNING: This requires an internet connection, or no AJAX will work on your site.'; +$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo‘s servers. WARNING: This requires an internet connection, or no AJAX will work on your site. This setting is not compatible with sites using https.'; $string['configusesitenameforsitepages'] = 'If enabled the site\'s shortname will be used for the site pages node in the navigation rather than the string \'Site pages\''; $string['configusetags'] = 'Should tags functionality across the site be enabled?'; $string['configvariables'] = 'Variables'; diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 0e31bdd47b0..56fbe201187 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -132,7 +132,7 @@ class page_requirements_manager { $this->yui3loader->filter = null; $this->yui2loader->filter = null; } - if (!empty($CFG->useexternalyui)) { + if (!empty($CFG->useexternalyui) and strpos($CFG->httpswwwroot, 'https:') !== 0) { $this->yui3loader->base = 'http://yui.yahooapis.com/' . $CFG->yui3version . '/build/'; $this->yui2loader->base = 'http://yui.yahooapis.com/' . $CFG->yui2version . '/build/'; $this->yui3loader->comboBase = 'http://yui.yahooapis.com/combo?';