You are here

function ife_install in Inline Form Errors 7.2

Same name and namespace in other branches
  1. 6.2 ife.install \ife_install()
  2. 6 ife.install \ife_install()
  3. 7 ife.install \ife_install()

Implements hook_install().

File

./ife.install, line 52
Install file.

Code

function ife_install() {

  // Update module weight.
  db_update('system')
    ->fields(array(
    'weight' => 1000,
  ))
    ->condition('name', 'ife')
    ->execute();

  // Insert some defaults.
  $form_ids = array(
    'comment_form',
    'contact_mail_user',
    'contact_mail_page',
    'user_register_form',
    'user_pass',
    'user_login',
    'user_login_block',
    'forum_node_form',
  );
  foreach ($form_ids as $form_id) {
    $id = db_insert('ife')
      ->fields(array(
      'form_id' => $form_id,
      'field_types' => NULL,
      'status' => 0,
    ))
      ->execute();
  }
}