Current implementation does not allow for https on certain requests

cytefx - August 26, 2009 - 12:58
Project:Omniture Integration
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The current implementation of the code, has 2 urls, one for the js code and one for the location of the image (used in the no script)

If you have a larger site that uses SSL for some requests you would have to put these both to ssl to avoid issue with users seeing page insecure issues thought the browser.

To fix this I am suggesting putting in another 2 fields that get called if the page called is in secure (HTTPS) mode. If you have not filled these in then the default will be your existing values.

#1

cytefx - August 26, 2009 - 14:19
Status:active» needs review

Here is a patch to include an extra 2 variables that allow for the secure locations of the files, the module will now switch to use the secure variables if the page is requested in a https session

AttachmentSize
omniture-559988.patch 3.17 KB

#2

greggles - August 27, 2009 - 15:15
Status:needs review» needs work

variable_get should always have a default value, even if it is variable_get('something', '');

Otherwise, looks good.

#3

cytefx - September 1, 2009 - 14:03
Status:needs work» needs review

Re-rolled patch, to include the default values for variable_get on the new https variables.

AttachmentSize
omniture-559988.patch 3.58 KB

#4

greggles - September 23, 2009 - 22:00

I'm not so sure about this change:

<?php
-      if (isset($omniture_hooked_vars['variables'])) {
+      if ((
$omniture_hooked_vars['variables'])) {
?>

The isset should prevent E_NOTICE warnings from PHP.

 
 

Drupal is a registered trademark of Dries Buytaert.