summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsacksick2013-04-08 10:03:04 (GMT)
committer Jonathan Sacksick2013-04-08 10:05:49 (GMT)
commitac4201b4e19d56dc7e548bd8ae00d11dd1e6fd42 (patch)
treecc67abbe552bdee87b868a2db97aa04209c1cea2
parent3ed3a9a3a8c53d4af7ddb6a508444ec4f49422c5 (diff)
Issue #1962148: Fix file_get_contents warning on Google DFP request.
Change-Id: I10c9d68e76f64b387d2de2190f158589287aae9c Reviewed-on: https://code.drupalcommerce.org/668 Tested-by: JenkinsCG <jenkins@drupalcommerce.org> Reviewed-by: Jonathan Sacksick <jonathan.sacksick@gmail.com>
-rw-r--r--commerce_kickstart.install3
-rw-r--r--modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module3
2 files changed, 4 insertions, 2 deletions
diff --git a/commerce_kickstart.install b/commerce_kickstart.install
index 51e8a0b..e5b88bd 100644
--- a/commerce_kickstart.install
+++ b/commerce_kickstart.install
@@ -79,7 +79,8 @@ function commerce_kickstart_install_tasks_alter(&$tasks, $install_state) {
$tasks[$install_state['active_task']]['dfp_settings'] += array(
'dfp_unit' => 'Kickstart_Install',
);
- drupal_add_js('//www.googletagservices.com/tag/js/gpt.js');
+ $prefix = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
+ drupal_add_js($prefix . 'www.googletagservices.com/tag/js/gpt.js');
drupal_add_js(array(
'dfp' => $tasks[$install_state['active_task']]['dfp_settings'],
), 'setting');
diff --git a/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module b/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
index 24c3268..4496cf0 100644
--- a/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
+++ b/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
@@ -23,7 +23,8 @@ function commerce_kickstart_dfp_page_build(&$page) {
'dfp_width' => 468,
);
drupal_add_css(drupal_get_path('module', 'commerce_kickstart_dfp') . '/theme/commerce_kickstart_dfp.css');
- drupal_add_js('//www.googletagservices.com/tag/js/gpt.js');
+ $prefix = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
+ drupal_add_js($prefix . 'www.googletagservices.com/tag/js/gpt.js');
drupal_add_js(array(
'dfp' => $dfp_settings[$current_path],
), 'setting');