You are here

function date_repeat_disable in Date 6.2

Same name and namespace in other branches
  1. 8 date_repeat/date_repeat.install \date_repeat_disable()
  2. 5.2 date_repeat/date_repeat.install \date_repeat_disable()
  3. 6 date_repeat/date_repeat.install \date_repeat_disable()
  4. 7 date_repeat/date_repeat.install \date_repeat_disable()

Implementation of hook_disable().

File

date_repeat/date_repeat.install, line 53
Install file for Date Repeat.

Code

function date_repeat_disable() {
  if (module_exists('content')) {
    drupal_load('module', 'content');
    if (!db_table_exists(content_instance_tablename())) {
      return;
    }
    db_query("UPDATE {" . content_instance_tablename() . "} SET widget_active=0 WHERE widget_type='%s' OR widget_type='%s' OR widget_type='%s'", 'date_select_repeat', 'date_text_repeat', 'date_popup_repeat');
    content_clear_type_cache(TRUE);
  }
}