You are here

function phone_enable in Phone 6

Same name and namespace in other branches
  1. 7.2 phone.install \phone_enable()

Implementation of hook_enable().

Notify content module when this module is enabled.

File

./phone.install, line 44
Defines phone number fields for CCK. Installation file

Code

function phone_enable() {
  drupal_load('module', 'content');

  // The 2 next lines are for 5.x to 6.x upgrade.
  db_query("UPDATE {" . content_instance_tablename() . "} SET widget_module = 'phone' WHERE widget_type = 'phone'");
  db_query("UPDATE {" . content_instance_tablename() . "} SET widget_type = 'phone_textfield' WHERE widget_type = 'phone'");
  content_notify('enable', 'phone');
}