$t('Date Popup requirements'), 'value' => $t('The Date Popup module needs code added by the jQuery UI module. This is not yet a requirement, but soon will be, so you are encouraged to install that module as soon as possible. In the meantime, a version of the needed code is included here.'), 'severity' => REQUIREMENT_WARNING, ); } break; } return $requirements; } /** * Implementation of hook_install(). */ function date_popup_install() { if (module_exists('content')) { drupal_load('module', 'content'); if (!db_table_exists(content_instance_tablename())) { return; } if (module_exists('date_repeat')) { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=1 WHERE widget_type='%s' OR widget_type='%s'", 'date_popup', 'date_popup_repeat'); } else { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=1 WHERE widget_type='%s'", 'date_popup'); } content_clear_type_cache(TRUE); } } /** * Implementation of hook_uninstall(). */ function date_popup_uninstall() { if (module_exists('content')) { drupal_load('module', 'content'); if (!db_table_exists(content_instance_tablename())) { return; } if (module_exists('date_repeat')) { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=0 WHERE widget_type='%s' OR widget_type='%s'", 'date_popup', 'date_popup_repeat'); } else { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=0 WHERE widget_type='%s'", 'date_popup'); } content_clear_type_cache(TRUE); } } /** * Implementation of hook_enable(). */ function date_popup_enable() { if (module_exists('content')) { drupal_load('module', 'content'); if (!db_table_exists(content_instance_tablename())) { return; } if (module_exists('date_repeat')) { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=1 WHERE widget_type='%s' OR widget_type='%s'", 'date_popup', 'date_popup_repeat'); } else { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=1 WHERE widget_type='%s'", 'date_popup'); } content_clear_type_cache(TRUE); } } /** * Implementation of hook_disable(). */ function date_popup_disable() { if (module_exists('content')) { drupal_load('module', 'content'); if (!db_table_exists(content_instance_tablename())) { return; } if (module_exists('date_repeat')) { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=0 WHERE widget_type='%s' OR widget_type='%s'", 'date_popup', 'date_popup_repeat'); } else { db_query("UPDATE {". content_instance_tablename() ."} SET widget_active=0 WHERE widget_type='%s'", 'date_popup'); } content_clear_type_cache(TRUE); } }