Index: omniture.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/omniture/omniture.module,v
retrieving revision 1.6.4.6
diff -u -p -r1.6.4.6 omniture.module
--- omniture.module 18 Feb 2010 16:33:36 -0000 1.6.4.6
+++ omniture.module 20 Jan 2011 16:14:34 -0000
@@ -100,12 +100,27 @@ function omniture_footer($main = 0) {
$extra_variables_formatted .= "\n". $variable .'="'. $value .'";';
}
}
-
+
+ // Check whether we are on an SSL page or not.
+ $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ? 'https://' : 'http://';
+ $omniture_js_file_location = check_plain(variable_get("omniture_js_file_location", 'www.example.com/js/s_code_remote_h.js'));
+ // Make sure the js file location specified in settings doesn\'t already
+ // include the protocol before adding the correct protocol for this page.
+ if (strpos($omniture_js_file_location, 'http://') === FALSE && strpos($omniture_js_file_location, 'https://') === FALSE) {
+ $omniture_js_file_location = $protocol . $omniture_js_file_location;
+ }
+ $omniture_image_file_location = check_plain(variable_get("omniture_image_file_location", 'examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0'));
+ // Make sure the image file location specified in settings doesn\'t already
+ // include the protocol before adding the correct protocol for this page.
+ if (strpos($omniture_image_file_location, 'http://') === FALSE && strpos($omniture_image_file_location, 'https://') === FALSE) {
+ $omniture_image_file_location = $protocol . $omniture_image_file_location;
+ }
+
$header = "\n";
$header .= "\n";
$header .= "