? omniture_hook.patch
? patch_file
Index: omniture.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/omniture/omniture.module,v
retrieving revision 1.5
diff -u -r1.5 omniture.module
--- omniture.module 6 Oct 2008 22:22:52 -0000 1.5
+++ omniture.module 7 Oct 2008 00:10:51 -0000
@@ -58,20 +58,8 @@
}
// Don't track page views in the admin sections, or for certain roles
- if (arg(0) != 'admin' && $track > 0 && !$match) {
+ if (arg(0) != 'admin' && $track > 0) {
-
- // If they have created an inc file, include it and run it
- $path = drupal_get_path('module', 'omniture');
- if (is_file($path .'/omniture.inc')) {
- require_once($path .'/omniture.inc');
-
- if (function_exists('omniture_variables')) {
- // Call the specific logic and loop through it to output it
- $omniture_inc_vars = omniture_variables(':');
- }
- }
-
// Add any custom code snippets if specified
$codesnippet = variable_get('omniture_codesnippet', '');
@@ -108,13 +96,7 @@
// Format and combine variables in the "right" order
// Right order is the code file (least likely to be maintained)
// Then admin settings with codesnippet first and finally taxonomy->vars
- $extra_variables_formatted = "";
- if (isset($omniture_inc_vars)) {
- foreach ($omniture_inc_vars as $variable => $value) {
- $extra_variables_formatted .= "\n". $variable .'="'. $value .'";';
- }
- }
- $extra_variables_formatted .= $codesnippet;
+ $extra_variables_formatted = $codesnippet;
if (isset($omniture_vocab_vars)) {
foreach ($omniture_vocab_vars as $variable => $value) {
@@ -122,43 +104,41 @@
}
}
- $script = "";
- $script .= '\n";
+ $header .= "'."\n";
+ $footer .= '