You are here

function signup_insert_default_signup_info in Signup 7

Same name and namespace in other branches
  1. 5.2 signup.install \signup_insert_default_signup_info()
  2. 5 signup.install \signup_insert_default_signup_info()
  3. 6.2 signup.install \signup_insert_default_signup_info()
  4. 6 signup.install \signup_insert_default_signup_info()

Helper method to insert the default signup information into the {signup} table (stored in a row for nid 0). These are the default settings for new signup-enabled nodes.

2 calls to signup_insert_default_signup_info()
signup_install in ./signup.install
Implements hook_install().
signup_settings_form_submit in includes/admin.settings.inc
Submits the signup settings form

File

./signup.install, line 189

Code

function signup_insert_default_signup_info() {

  // TODO Please review the conversion of this statement to the D7 database API syntax.

  /* db_query("INSERT INTO {signup} (nid, forwarding_email,
     send_confirmation, confirmation_email,
     send_reminder, reminder_days_before, reminder_email,
     close_in_advance_time, close_signup_limit, status, user_reg_form) VALUES (0, '',
     1, 'Enter your default confirmation email message here',
     1, 1, 'Enter your default reminder email message here',
     0, 0, 1, 0)") */
  return $id = db_insert('signup')
    ->fields(array(
    'nid' => 0,
    'forwarding_email' => '',
    'send_confirmation' => 1,
    'confirmation_email' => 'Enter your default confirmation email message here',
    'send_reminder' => 1,
    'reminder_days_before' => 1,
    'reminder_email' => 'Enter your default reminder email message here',
    'close_in_advance_time' => 0,
    'close_signup_limit' => 0,
    'status' => 1,
    'user_reg_form' => 0,
  ))
    ->execute();
}