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

Diff of /contributions/modules/single_login/single_login.install

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

revision 1.1.2.1, Tue Oct 7 21:14:30 2008 UTC revision 1.1.2.2, Tue Oct 7 22:10:21 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: single_login.install,v 1.1.2.1 2008/10/07 21:14:30 sanduhrs Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 38  function single_login_install() { Line 38  function single_login_install() {
38        drupal_set_message(t('Watch List database tables have not been installed! PgSQL is not supported'));        drupal_set_message(t('Watch List database tables have not been installed! PgSQL is not supported'));
39        break;        break;
40    }    }
   
   // needed for google analytics  
   db_query("INSERT INTO {profile_fields} (  
               title, name, explanation,  
               category, page, type, weight, required,  
               register, visibility, autocomplete, options  
             ) VALUES (  
               'Current Session ID', 'profile_current_session_id', 'User session ID',  
               'User Information', '', 'textfield', 0, 0,  
               0, 4, 0, '')");  
41  }  }
42    
43  /**  /**
# Line 57  function single_login_uninstall() { Line 47  function single_login_uninstall() {
47    db_query('DROP TABLE {single_login}');    db_query('DROP TABLE {single_login}');
48    db_query('DROP TABLE {single_login_history}');    db_query('DROP TABLE {single_login_history}');
49    
50    $res = db_query('SELECT fid FROM {profile_fields} WHERE name = \'profile_current_session_id\'');    if (module_exists('profile')) {
51    if (db_num_rows($res)) {      $res = db_query('SELECT fid FROM {profile_fields} WHERE name = \'profile_current_session_id\'');
52      $row = db_fetch_object($res);      if (db_num_rows($res)) {
53      db_query('DELETE FROM {profile_fields} WHERE fid = %d', $row->fid);        $row = db_fetch_object($res);
54      db_query('DELETE FROM {profile_values} WHERE fid = %d', $row->fid);        db_query('DELETE FROM {profile_fields} WHERE fid = %d', $row->fid);
55          db_query('DELETE FROM {profile_values} WHERE fid = %d', $row->fid);
56        }
57    }    }
58  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2