You are here

function mail_edit_install in Mail Editor 6

Same name and namespace in other branches
  1. 5 mail_edit.install \mail_edit_install()

Implementation of hook_install().

File

./mail_edit.install, line 11
Install, update and uninstall functions for the Mail Editor module.

Code

function mail_edit_install() {
  if (db_table_exists('mail_edit') && !db_table_exists('mail_edit_registry')) {

    // This must be a left-over from the (incompatible!) D5 version, see #318324.
    // Move the old table out of the way.
    $ret = array();
    db_rename_table($ret, 'mail_edit', 'mail_edit_d5');
    if ($ret[0]['success']) {
      watchdog('mail_edit', 'The %mail_edit table has been renamed to %mail_edit_d5.', array(
        '%mail_edit' => '{mail_edit}',
        '%mail_edit_d5' => '{mail_edit_d5}',
      ), WATCHDOG_NOTICE);
    }
  }
  drupal_install_schema('mail_edit');
}