You are here

function wysiwyg_install in Wysiwyg 5

Same name and namespace in other branches
  1. 5.2 wysiwyg.install \wysiwyg_install()
  2. 6.2 wysiwyg.install \wysiwyg_install()
  3. 6 wysiwyg.install \wysiwyg_install()

Implementation of hook_install().

File

./wysiwyg.install, line 6

Code

function wysiwyg_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {wysiwyg} (\n        format int NOT NULL default '0',\n        editor varchar(128) NOT NULL default '',\n        settings text,\n        PRIMARY KEY (format)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {wysiwyg} (\n        format int NOT NULL default '0',\n        editor varchar(128) NOT NULL default '',\n        settings text,\n        PRIMARY KEY (format)\n      )");
      break;
  }

  // Import settings from old editor modules.
  wysiwyg_migrate_tinymce();
}