mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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
This commit is contained in:
parent
81e8faecbc
commit
c6a2d81bd3
1 changed files with 4 additions and 3 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue