You are here

function messaging_template_install in Messaging 6.3

Same name and namespace in other branches
  1. 6.4 messaging_template/messaging_template.install \messaging_template_install()

Implementation of hook_install().

File

messaging_template/messaging_template.install, line 105

Code

function messaging_template_install() {

  // Create tables.
  drupal_install_schema('messaging_template');

  // Load old templates
  if (db_table_exists('messaging_template_parts')) {
    db_query("INSERT INTO {messaging_template_text}(name, method, msgkey, template, options) SELECT type, method, msgkey, message, 1 FROM {messaging_message_parts}");
    db_query("UPDATE {messaging_template_text} SET template = '' WHERE template = '<empty>'");
  }
}