You are here

img_assist.install in Image Assist 5.2

File

img_assist.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function img_assist_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query('CREATE TABLE {img_assist_map} (
        nid INT(10) UNSIGNED NOT NULL ,
        iid INT(10) UNSIGNED NOT NULL ,
        PRIMARY KEY (nid, iid)
      ) /*!40100 DEFAULT CHARACTER SET utf8 */;');
      break;
    case 'pgsql':
      db_query('CREATE TABLE {img_assist_map} (
        nid integer NOT NULL,
        iid integer NOT NULL,
        PRIMARY KEY (nid, iid)
      );');
      break;
  }
}

/**
 * Implementation of hook_uninstall().
 */
function img_assist_uninstall() {
  db_query('DROP TABLE {img_assist_map}');
  variable_del('img_assist_page_styling');
  variable_del('img_assist_link');
  variable_del('img_assist_all');
  variable_del('img_assist_pages');
  variable_del('img_assist_link');
  variable_del('img_assist_preview_count');
  variable_del('img_assist_max_size');
  variable_del('img_assist_popup_label');
  variable_del('img_assist_default_label');
  variable_del('img_assist_create_derivatives');
  variable_del('img_assist_default_link_behavior');
  variable_del('img_assist_default_link_url');
  variable_del('img_assist_default_insert_mode');
  variable_del('img_assist_load_title');
  variable_del('img_assist_load_description');
  variable_del('img_assist_vocabs');
  variable_del('img_assist_default_alignment');
  variable_del('img_assist_all');
}

Functions

Namesort descending Description
img_assist_install Implementation of hook_install().
img_assist_uninstall Implementation of hook_uninstall().