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

Diff of /contributions/modules/rsvp/rsvp.install

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

revision 1.10.2.4, Sun Aug 23 04:13:46 2009 UTC revision 1.10.2.5, Thu Nov 5 22:36:47 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: rsvp.install,v 1.10.2.3 2009/03/16 18:17:31 ulf1 Exp $  // $Id: rsvp.install,v 1.10.2.4 2009/08/23 04:13:46 ulf1 Exp $
3    
4  function rsvp_install() {  function rsvp_install() {
5    drupal_install_schema('rsvp');    drupal_install_schema('rsvp');
# Line 150  function rsvp_schema() { Line 150  function rsvp_schema() {
150          'not null' => TRUE,          'not null' => TRUE,
151          'default' => 0          'default' => 0
152        ),        ),
       'send_conf_owner' => array(  
         'description' => ('Send confirmation emails to owner when guest replies'),  
         'type' => 'int',  
         'size' => 'tiny',  
         'unsigned' => TRUE,  
         'not null' => TRUE,  
         'default' => 0  
       ),  
       'send_conf_guest' => array(  
         'description' => ('Send confirmation emails to guest when he replies'),  
         'type' => 'int',  
         'size' => 'tiny',  
         'unsigned' => TRUE,  
         'not null' => TRUE,  
         'default' => 0  
       ),  
       'send_privatemsg' => array(  
         'description' => ('Send emails by privatemsg for registered users'),  
         'type' => 'int',  
         'size' => 'tiny',  
         'unsigned' => TRUE,  
         'not null' => TRUE,  
         'default' => 0  
       ),  
       'disable_maybe' => array(  
         'description' => ('Allow maybe as answer or not.'),  
         'type' => 'int',  
         'size' => 'tiny',  
         'unsigned' => TRUE,  
         'not null' => TRUE,  
         'default' => 0  
       ),  
153        'reply_startdate' => array(        'reply_startdate' => array(
154          'description' => ('Determines when guests can start replying'),          'description' => ('Determines when guests can start replying'),
155          'type' => 'int',          'type' => 'int',
# Line 196  function rsvp_schema() { Line 164  function rsvp_schema() {
164          'not null' => TRUE,          'not null' => TRUE,
165          'default' => 0          'default' => 0
166        ),        ),
       'open_invitation' => array(  
         'description' => ('Can other registered users signup to the invitation'),  
         'type' => 'int',  
         'size' => 'tiny',  
         'unsigned' => TRUE,  
         'not null' => TRUE,  
         'default' => 0  
       ),  
167        'max_guests' => array(        'max_guests' => array(
168          'description' => ('The maximum number of guests allowed to attend'),          'description' => ('The maximum number of guests allowed to attend'),
169          'type' => 'int',          'type' => 'int',
# Line 241  function rsvp_schema() { Line 201  function rsvp_schema() {
201          'length' => 128,          'length' => 128,
202          'default' => ''          'default' => ''
203        ),        ),
204          'option_enabled' => array(
205            'description' => ('A field with bits each having a different meaning'),
206            'type' => 'int',
207            'unsigned' => TRUE,
208            'not null' => TRUE,
209            'default' => 0
210          ),
211    
212      ),      ),
213      'primary key' => array('rid', 'nid', 'uid'),      'primary key' => array('rid', 'nid', 'uid'),
# Line 365  function rsvp_uninstall() { Line 332  function rsvp_uninstall() {
332    variable_del('rsvp_from_address');    variable_del('rsvp_from_address');
333    variable_del('rsvp_for_expired_event');    variable_del('rsvp_for_expired_event');
334    
335    foreach (array('max_guests', 'open_invitation', 'disable_maybe', 'send_privatemsg',    foreach (array('max_guests', 'option_enabled',
                  'send_conf_guest', 'send_conf_owner',  
336                   'rsvp_view_roles', 'response_view_roles', 'response_blind', 'response_blind_node',                   'rsvp_view_roles', 'response_view_roles', 'response_blind', 'response_blind_node',
337                   'reply_blind_node', 'attendees_visible', 'list_email', 'allow_invite',                   'reply_blind_node', 'attendees_visible', 'list_email', 'allow_invite',
338                   'text_whoiscoming', 'text_yes', 'text_no', 'text_maybe', 'theme', 'stylesheet', 'iconset', 'backgroundimage', 'image') as $key) {                   'text_whoiscoming', 'text_yes', 'text_no', 'text_maybe', 'theme', 'stylesheet', 'iconset', 'backgroundimage', 'image') as $key) {
# Line 724  function rsvp_update_6201() { Line 690  function rsvp_update_6201() {
690    return $ret;    return $ret;
691  }  }
692    
693    function rsvp_update_6202() {
694    
695      $ret = array();
696    
697      db_add_field($ret, 'rsvp', 'option_enabled', array(
698            'description' => ('A field with bits each having a different meaning'),
699            'type' => 'int',
700            'unsigned' => TRUE,
701            'not null' => TRUE,
702            'default' => 0
703            )
704      );
705    
706      db_drop_field($ret, 'rsvp', 'open_invitation');
707      db_drop_field($ret, 'rsvp', 'disable_maybe');
708      db_drop_field($ret, 'rsvp', 'send_privatemsg');
709      db_drop_field($ret, 'rsvp', 'send_conf_owner');
710      db_drop_field($ret, 'rsvp', 'send_conf_guest');
711    
712      foreach (array('open_invitation', 'disable_maybe', 'send_privatemsg',
713                     'send_conf_guest', 'send_conf_owner') as $key) {
714    
715        variable_del('rsvp_default_' . $key);
716      }
717    
718    
719      drupal_set_message(t('RSVP options: Please edit default settings and all existing invitations and set send_conf_owner, send_conf_guest, send_privatemsg, disable_maybe and open_invitation'));
720    
721      return $ret;
722    }
723    
724  /**  /**
725   * Implementation of hook_enable().   * Implementation of hook_enable().
726   */   */

Legend:
Removed from v.1.10.2.4  
changed lines
  Added in v.1.10.2.5

  ViewVC Help
Powered by ViewVC 1.1.2