aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2011-09-26 11:13:16 -0700
committerMatt Friedman <maf675@gmail.com>2011-09-27 11:11:30 -0700
commitc6a2d81bd359711aeb9dc36478977e779d3bdfe9 (patch)
tree261b5f871694c7ac52f88bd792fb9467dff942a4
parent81e8faecbcc4f8c22a1dafdefe848ac548a6c77a (diff)
downloadforums-c6a2d81bd359711aeb9dc36478977e779d3bdfe9.tar
forums-c6a2d81bd359711aeb9dc36478977e779d3bdfe9.tar.gz
forums-c6a2d81bd359711aeb9dc36478977e779d3bdfe9.tar.bz2
forums-c6a2d81bd359711aeb9dc36478977e779d3bdfe9.tar.xz
forums-c6a2d81bd359711aeb9dc36478977e779d3bdfe9.zip
[ticket/10390] Drop http protocol for Microsoft's CDN option
Like Google, Microsoft supports both http and https protocols, so we can drop the protocol alltogether from the url so the Microsoft CDN will work on both HTTP or HTTPS sites without issue. Also I cleaned up some of the comments here. PHPBB3-10390
-rw-r--r--phpBB/includes/functions.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 83cadf426d..8cdafbd95e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4773,6 +4773,8 @@ function phpbb_pcre_utf8_support()
/**
* Build jQuery URL for remote CDNs
* Reference: http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
+* HTTP protocols intentionally omitted for Google and Microsoft - its the best
+* way to reference third party content that is available via both HTTP and HTTPS
*
* @return string Returns url to a jQuery library
*/
@@ -4781,15 +4783,14 @@ function remote_jquery_url($host)
switch($host)
{
case 'google':
- // Google uses a 1.5.0, 1.5.1 format (it adds a .0 to new 1.X releases)
+ // Google uses a 1.5.0, 1.5.1 format (we need to add a .0 to new 1.X releases)
$version = (substr_count(JQUERY_VERSION, '.') == 1) ? JQUERY_VERSION . '.0' : JQUERY_VERSION;
- // HTTP protocol intentionally omitted - its the best way to reference third party content that is available via both HTTP and HTTPS
$url = '//ajax.googleapis.com/ajax/libs/jquery/' . $version . '/jquery.min.js';
break;
case 'microsoft':
// Microsoft uses a 1.5, 1.5.1 format
- $url = 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js';
+ $url = '//ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js';
break;
case 'jquery':