/[drupal]/contributions/modules/omniture/omniture.install
ViewVC logotype

Contents of /contributions/modules/omniture/omniture.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Mon Oct 6 22:22:52 2008 UTC (13 months, 2 weeks ago) by ultimateboy
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
Changes since 1.3: +2 -2 lines
File MIME type: text/x-php
Changed name to SiteCatalyst throughout. Thanks to BlessedSteve and greggles.
http://drupal.org/node/181786
1 <?php
2 // $Id: omniture.install,v 1.3 2008/10/03 02:33:16 ultimateboy Exp $
3 /*
4 * @file
5 * Installs the module, Omniture.
6 *
7 */
8 function omniture_install() {
9 $result = db_query('SELECT * FROM {role} ORDER BY name');
10
11 while ($role = db_fetch_object($result)) {
12 $role_varname = $string = str_replace(" ", "_", $role->name);
13 $omniture_role = "omniture_track_{$role_varname}";
14
15 //check if variable is not already set from a previous install
16 if (strpos(variable_get($omniture_role, 'new'), 'new') !== FALSE) {
17 variable_set($omniture_role, TRUE);
18 drupal_set_message(t('Role %rolename is now being tracked by SiteCatalyst', array('%rolename' => $role->name)));
19 }
20 }
21 }

  ViewVC Help
Powered by ViewVC 1.1.2