| 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'); |
| 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', |
| 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', |
| 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'), |
| 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) { |
| 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 |
*/ |
*/ |