From 682be616f340298aaeafc2e3cf69ba355be01b12 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Mon, 8 Nov 2010 22:17:08 +0000 Subject: [PATCH] Load assets on stats pages complying to SSL preference. Partially fixed only. See issue 556. git-svn-id: http://yourls.googlecode.com/svn/trunk@554 12232710-3e20-11de-b438-597f59cd7555 --- includes/functions-infos.php | 34 +++++++++++++++++++++++----------- includes/functions.php | 9 ++++++++- yourls-infos.php | 4 ++-- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/includes/functions-infos.php b/includes/functions-infos.php index 820e645..83e6fc6 100644 --- a/includes/functions-infos.php +++ b/includes/functions-infos.php @@ -15,34 +15,38 @@ function yourls_stats_countries_map( $countries ) { 'chf' => 'bg,s,EAF7FE' ); $map_src = 'http://chart.apis.google.com/chart?' . http_build_query( $map ); - echo ""; + //$map_src = yourls_match_current_protocol( $map_src, 'http://chart.apis.', 'https://www.' ); + + $static = ""; + echo yourls_apply_filter( 'stats_countries_static', $static, $countries ); // Echo dynamic map. Will be hidden if no JS - echo << + $jsapi = yourls_match_current_protocol( 'http://www.google.com/jsapi' ); + $dynamic = <<