Commit ac7637bc authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#172773 by numerous contributors: Make the actions interface usable by mere...

#172773 by numerous contributors: Make the actions interface usable by mere mortals (including rename of actions.module to trigger, but keeping the actions themselfs).

Complete previous history of actions module:
 - #148410 by jvandyk: added rewrite of the actions module!
 - #155986 by Uwe: fixed typos.
 - #155828 by Eaton, pwolanin and jvandyk: let actions live even if actions.module is not turned on
parent f73786d1
...@@ -2144,16 +2144,16 @@ function comment_hook_info() { ...@@ -2144,16 +2144,16 @@ function comment_hook_info() {
'comment' => array( 'comment' => array(
'comment' => array( 'comment' => array(
'insert' => array( 'insert' => array(
'runs when' => t('When a comment has been created'), 'runs when' => t('After saving a new comment'),
), ),
'update' => array( 'update' => array(
'runs when' => t('When a comment has been updated'), 'runs when' => t('After saving an updated comment'),
), ),
'delete' => array( 'delete' => array(
'runs when' => t('When a comment has been deleted') 'runs when' => t('After deleting a comment')
), ),
'view' => array( 'view' => array(
'runs when' => t('When a comment is being viewed') 'runs when' => t('When a comment is being viewed by an authenticated user')
), ),
), ),
), ),
...@@ -2170,7 +2170,7 @@ function comment_action_info() { ...@@ -2170,7 +2170,7 @@ function comment_action_info() {
'type' => 'comment', 'type' => 'comment',
'configurable' => FALSE, 'configurable' => FALSE,
'hooks' => array( 'hooks' => array(
'comment' => array('insert', 'update', 'view'), 'comment' => array('insert', 'update'),
) )
), ),
'comment_unpublish_by_keyword_action' => array( 'comment_unpublish_by_keyword_action' => array(
...@@ -2209,7 +2209,7 @@ function comment_unpublish_by_keyword_action_form($context) { ...@@ -2209,7 +2209,7 @@ function comment_unpublish_by_keyword_action_form($context) {
$form['keywords'] = array( $form['keywords'] = array(
'#title' => t('Keywords'), '#title' => t('Keywords'),
'#type' => 'textarea', '#type' => 'textarea',
'#description' => t('The comment will be unpublished if it contains any of the character sequences above. Use a comma-separated list of character sequences. Example: funny, bungee jumping, "Company, Inc.".'), '#description' => t('The comment will be unpublished if it contains any of the character sequences above. Use a comma-separated list of character sequences. Example: funny, bungee jumping, "Company, Inc.". Character sequences are case-sensitive.'),
'#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '', '#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '',
); );
return $form; return $form;
......
...@@ -2308,16 +2308,16 @@ function node_hook_info() { ...@@ -2308,16 +2308,16 @@ function node_hook_info() {
'node' => array( 'node' => array(
'nodeapi' => array( 'nodeapi' => array(
'presave' => array( 'presave' => array(
'runs when' => t('When content is about to be saved'), 'runs when' => t('When either saving a new post or updating an existing post'),
), ),
'insert' => array( 'insert' => array(
'runs when' => t('When content has been created'), 'runs when' => t('After saving a new post'),
), ),
'update' => array( 'update' => array(
'runs when' => t('When content has been updated'), 'runs when' => t('After saving an updated post'),
), ),
'delete' => array( 'delete' => array(
'runs when' => t('When content has been deleted') 'runs when' => t('After deleting a post')
), ),
'view' => array( 'view' => array(
'runs when' => t('When content is viewed by an authenticated user') 'runs when' => t('When content is viewed by an authenticated user')
...@@ -2336,65 +2336,71 @@ function node_action_info() { ...@@ -2336,65 +2336,71 @@ function node_action_info() {
'type' => 'node', 'type' => 'node',
'description' => t('Publish post'), 'description' => t('Publish post'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('insert', 'update'),
), ),
), ),
'node_unpublish_action' => array( 'node_unpublish_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Unpublish post'), 'description' => t('Unpublish post'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('delete', 'insert', 'update'),
), ),
), ),
'node_make_sticky_action' => array( 'node_make_sticky_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Make post sticky'), 'description' => t('Make post sticky'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('insert', 'update'),
), ),
), ),
'node_make_unsticky_action' => array( 'node_make_unsticky_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Make post unsticky'), 'description' => t('Make post unsticky'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('delete', 'insert', 'update'),
), ),
), ),
'node_promote_action' => array( 'node_promote_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Promote post to front page'), 'description' => t('Promote post to front page'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('insert', 'update'),
'user' => array('login'),
), ),
), ),
'node_unpromote_action' => array( 'node_unpromote_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Remove post from front page'), 'description' => t('Remove post from front page'),
'configurable' => FALSE, 'configurable' => FALSE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('delete', 'insert', 'update'),
), ),
), ),
'node_assign_owner_action' => array( 'node_assign_owner_action' => array(
'type' => 'node', 'type' => 'node',
'description' => t('Change the author of a post'), 'description' => t('Change the author of a post'),
'configurable' => TRUE, 'configurable' => TRUE,
'behavior' => array('changes_node_property'),
'hooks' => array( 'hooks' => array(
'any' => TRUE, 'any' => TRUE,
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave'),
'comment' => array('delete', 'insert', 'update', 'view'), 'comment' => array('delete', 'insert', 'update'),
), ),
), ),
'node_save_action' => array( 'node_save_action' => array(
...@@ -2402,9 +2408,7 @@ function node_action_info() { ...@@ -2402,9 +2408,7 @@ function node_action_info() {
'description' => t('Save post'), 'description' => t('Save post'),
'configurable' => FALSE, 'configurable' => FALSE,
'hooks' => array( 'hooks' => array(
'nodeapi' => array('delete', 'insert', 'update', 'view'), 'comment' => array('delete', 'insert', 'update'),
'comment' => array('delete', 'insert', 'update', 'view'),
'user' => array('login'),
), ),
), ),
'node_unpublish_by_keyword_action' => array( 'node_unpublish_by_keyword_action' => array(
...@@ -2412,8 +2416,7 @@ function node_action_info() { ...@@ -2412,8 +2416,7 @@ function node_action_info() {
'description' => t('Unpublish post containing keyword(s)'), 'description' => t('Unpublish post containing keyword(s)'),
'configurable' => TRUE, 'configurable' => TRUE,
'hooks' => array( 'hooks' => array(
'nodeapi' => array('presave', 'insert', 'update', 'view'), 'nodeapi' => array('presave', 'insert', 'update'),
'comment' => array('delete', 'insert', 'update', 'view'),
), ),
), ),
); );
...@@ -2546,7 +2549,7 @@ function node_unpublish_by_keyword_action_form($context) { ...@@ -2546,7 +2549,7 @@ function node_unpublish_by_keyword_action_form($context) {
$form['keywords'] = array( $form['keywords'] = array(
'#title' => t('Keywords'), '#title' => t('Keywords'),
'#type' => 'textarea', '#type' => 'textarea',
'#description' => t('The node will be unpublished if it contains any of the character sequences above. Use a comma-separated list of character sequences. Example: funny, bungee jumping, "Company, Inc.".'), '#description' => t('The node will be unpublished if it contains any of the character sequences above. Use a comma-separated list of character sequences. Example: funny, bungee jumping, "Company, Inc.". Character sequences are case-sensitive.'),
'#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '', '#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '',
); );
return $form; return $form;
......
...@@ -52,14 +52,16 @@ function system_help($path, $arg) { ...@@ -52,14 +52,16 @@ function system_help($path, $arg) {
return $output; return $output;
case 'admin/build/modules/uninstall': case 'admin/build/modules/uninstall':
return '<p>'. t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it. Not all modules support this feature.') .'</p>'; return '<p>'. t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it. Not all modules support this feature.') .'</p>';
case 'admin/build/actions': case 'admin/settings/actions':
case 'admin/build/actions/manage': case 'admin/settings/actions/manage':
$explanation = t('Actions are functions that Drupal can execute when certain events happen, such as when a post is added or a user logs in.'); $output = '<p>'. t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the trigger module, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions.') .'</p>';
$output = '<p>'. $explanation .' '. t('A module, such as the actions module, may assign these actions to the specific events that will trigger them.') .'</p>'; $output .= '<p>'. t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration, and are listed here automatically. Advanced actions can do more than simple actions; for example, send an e-mail to a specified address, or check for certain words within a piece of content. These actions need to be created and configured first before they may be used. To create an advanced action, select the action from the drop-down below and click the <em>Create</em> button.') .'</p>';
$output .= '<p>'. t('This page lists all actions that are available. Simple actions that do not require any configuration are listed automatically. Advanced actions that need to be configured are listed in the dropdown below. To add an advanced action, select the action and click the <em>Configure</em> button. After completing the configuration form, the action will be available for use by Drupal.') .'</p>'; if (module_exists('trigger')) {
$output .= '<p>'. t('You may proceed to the <a href="@url">Triggers</a> page to assign these actions to system events.', array('@url' => url('admin/build/trigger'))) .'</p>';
}
return $output; return $output;
case 'admin/build/actions/config': case 'admin/settings/actions/configure':
return '<p>'. t('This is where you configure a certain action that will be performed at some time in the future. For example, you might configure an action to send email to your friend Joe. You would modify the description field, below, to read %send to remind you of that. The description you provide will be used to identify this action; for example, when assigning an action to a Drupal event such as a new comment being posted.', array('%send' => t('Send email to Joe'))) .'</p>'; return t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended, in order to better identify the precise action taking place. This description will be displayed in modules such as the trigger module when assigning actions to system events, so it is best if it is as descriptive as possible (for example, "Send e-mail to Moderation Team" rather than simply "Send e-mail").');
case 'admin/logs/status': case 'admin/logs/status':
return '<p>'. t("Here you can find a short overview of your Drupal site's parameters as well as any problems detected with your installation. It is useful to copy/paste this information when you need support.") .'</p>'; return '<p>'. t("Here you can find a short overview of your Drupal site's parameters as well as any problems detected with your installation. It is useful to copy/paste this information when you need support.") .'</p>';
} }
...@@ -273,33 +275,33 @@ function system_menu() { ...@@ -273,33 +275,33 @@ function system_menu() {
); );
// Actions: // Actions:
$items['admin/build/actions'] = array( $items['admin/settings/actions'] = array(
'title' => 'Actions', 'title' => 'Actions',
'description' => 'Manage the actions defined for your site.', 'description' => 'Manage the actions defined for your site.',
'access arguments' => array('administer actions'), 'access arguments' => array('administer actions'),
'page callback' => 'system_actions_manage' 'page callback' => 'system_actions_manage'
); );
$items['admin/build/actions/manage'] = array( $items['admin/settings/actions/manage'] = array(
'title' => 'Manage actions', 'title' => 'Manage actions',
'description' => 'Manage the actions defined for your site.', 'description' => 'Manage the actions defined for your site.',
'page callback' => 'system_actions_manage', 'page callback' => 'system_actions_manage',
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -2, 'weight' => -2,
); );
$items['admin/build/actions/config'] = array( $items['admin/settings/actions/configure'] = array(
'title' => 'Configure an action', 'title' => 'Configure an advanced action',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('system_actions_configure'), 'page arguments' => array('system_actions_configure'),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
); );
$items['admin/build/actions/delete/%actions'] = array( $items['admin/settings/actions/delete/%actions'] = array(
'title' => 'Delete action', 'title' => 'Delete action',
'description' => 'Delete an action.', 'description' => 'Delete an action.',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('system_actions_delete_form', 4), 'page arguments' => array('system_actions_delete_form', 4),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
); );
$items['admin/build/actions/orphan'] = array( $items['admin/settings/actions/orphan'] = array(
'title' => 'Remove orphans', 'title' => 'Remove orphans',
'page callback' => 'system_actions_remove_orphans', 'page callback' => 'system_actions_remove_orphans',
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
...@@ -1148,7 +1150,7 @@ function system_actions_manage() { ...@@ -1148,7 +1150,7 @@ function system_actions_manage() {
$row = array(); $row = array();
$instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters != ''")); $instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters != ''"));
$header = array( $header = array(
array('data' => t('Action Type'), 'field' => 'type'), array('data' => t('Action type'), 'field' => 'type'),
array('data' => t('Description'), 'field' => 'description'), array('data' => t('Description'), 'field' => 'description'),
array('data' => $instances_present ? t('Operations') : '', 'colspan' => '2') array('data' => $instances_present ? t('Operations') : '', 'colspan' => '2')
); );
...@@ -1158,8 +1160,8 @@ function system_actions_manage() { ...@@ -1158,8 +1160,8 @@ function system_actions_manage() {
$row[] = array( $row[] = array(
array('data' => $action->type), array('data' => $action->type),
array('data' => $action->description), array('data' => $action->description),
array('data' => $action->parameters ? l(t('configure'), "admin/build/actions/config/$action->aid") : ''), array('data' => $action->parameters ? l(t('configure'), "admin/settings/actions/configure/$action->aid") : ''),
array('data' => $action->parameters ? l(t('delete'), "admin/build/actions/delete/$action->aid") : '') array('data' => $action->parameters ? l(t('delete'), "admin/settings/actions/delete/$action->aid") : '')
); );
} }
...@@ -1202,14 +1204,14 @@ function system_actions_manage_form($form_state, $options = array()) { ...@@ -1202,14 +1204,14 @@ function system_actions_manage_form($form_state, $options = array()) {
); );
$form['parent']['buttons']['submit'] = array( $form['parent']['buttons']['submit'] = array(
'#type' => 'submit', '#type' => 'submit',
'#value' => t('Configure'), '#value' => t('Create'),
); );
return $form; return $form;
} }
function system_actions_manage_form_submit($form, &$form_state) { function system_actions_manage_form_submit($form, &$form_state) {
if ($form_state['values']['action']) { if ($form_state['values']['action']) {
$form_state['redirect'] = 'admin/build/actions/config/'. $form_state['values']['action']; $form_state['redirect'] = 'admin/settings/actions/configure/'. $form_state['values']['action'];
} }
} }
...@@ -1230,7 +1232,7 @@ function system_actions_manage_form_submit($form, &$form_state) { ...@@ -1230,7 +1232,7 @@ function system_actions_manage_form_submit($form, &$form_state) {
*/ */
function system_actions_configure($form_state, $action = NULL) { function system_actions_configure($form_state, $action = NULL) {
if ($action === NULL) { if ($action === NULL) {
drupal_goto('admin/build/actions'); drupal_goto('admin/settings/actions');
} }
$actions_map = actions_actions_map(actions_list()); $actions_map = actions_actions_map(actions_list());
...@@ -1259,14 +1261,12 @@ function system_actions_configure($form_state, $action = NULL) { ...@@ -1259,14 +1261,12 @@ function system_actions_configure($form_state, $action = NULL) {
$edit['actions_type'] = $actions_map[$action]['type']; $edit['actions_type'] = $actions_map[$action]['type'];
} }
$form['actions_description'] = array( $form['actions_description'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Description'), '#title' => t('Description'),
'#default_value' => $edit['actions_description'], '#default_value' => $edit['actions_description'],
'#size' => '70',
'#maxlength' => '255', '#maxlength' => '255',
'#description' => t('A unique description for this configuration of this action. This will be used to describe this action when assigning actions.'), '#description' => t('A unique description for this advanced action. This description will be displayed in the interface of modules that integrate with actions, such as Trigger module.'),
'#weight' => -10 '#weight' => -10
); );
$action_form = $function .'_form'; $action_form = $function .'_form';
...@@ -1318,7 +1318,7 @@ function system_actions_configure_submit($form, &$form_state) { ...@@ -1318,7 +1318,7 @@ function system_actions_configure_submit($form, &$form_state) {
actions_save($function, $form_state['values']['actions_type'], $params, $form_state['values']['actions_description'], $aid); actions_save($function, $form_state['values']['actions_type'], $params, $form_state['values']['actions_description'], $aid);
drupal_set_message(t('The action has been successfully saved.')); drupal_set_message(t('The action has been successfully saved.'));
$form_state['redirect'] = 'admin/build/actions/manage'; $form_state['redirect'] = 'admin/settings/actions/manage';
} }
/** /**
...@@ -1335,7 +1335,7 @@ function system_actions_delete_form($form_state, $action) { ...@@ -1335,7 +1335,7 @@ function system_actions_delete_form($form_state, $action) {
); );
return confirm_form($form, return confirm_form($form,
t('Are you sure you want to delete the action %action?', array('%action' => $action->description)), t('Are you sure you want to delete the action %action?', array('%action' => $action->description)),
'admin/build/actions/manage', 'admin/settings/actions/manage',
t('This cannot be undone.'), t('This cannot be undone.'),
t('Delete'), t('Cancel') t('Delete'), t('Cancel')
); );
...@@ -1351,7 +1351,7 @@ function system_actions_delete_form_submit($form, &$form_state) { ...@@ -1351,7 +1351,7 @@ function system_actions_delete_form_submit($form, &$form_state) {
$description = check_plain($action->description); $description = check_plain($action->description);
watchdog('user', 'Deleted action %aid (%action)', array('%aid' => $aid, '%action' => $description)); watchdog('user', 'Deleted action %aid (%action)', array('%aid' => $aid, '%action' => $description));
drupal_set_message(t('Action %action was deleted', array('%action' => $description))); drupal_set_message(t('Action %action was deleted', array('%action' => $description)));
$form_state['redirect'] = 'admin/build/actions/manage'; $form_state['redirect'] = 'admin/settings/actions/manage';
} }
/** /**
* Post-deletion operations for deleting action orphans. * Post-deletion operations for deleting action orphans.
...@@ -1368,7 +1368,7 @@ function system_action_delete_orphans_post($orphaned) { ...@@ -1368,7 +1368,7 @@ function system_action_delete_orphans_post($orphaned) {
*/ */
function system_actions_remove_orphans() { function system_actions_remove_orphans() {
actions_synchronize(actions_list(), TRUE); actions_synchronize(actions_list(), TRUE);
drupal_goto('admin/build/actions/manage'); drupal_goto('admin/settings/actions/manage');
} }
/** /**
...@@ -1395,15 +1395,13 @@ function system_send_email_action_form($context) { ...@@ -1395,15 +1395,13 @@ function system_send_email_action_form($context) {
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Recipient'), '#title' => t('Recipient'),
'#default_value' => $context['recipient'], '#default_value' => $context['recipient'],
'#size' => '20',
'#maxlength' => '254', '#maxlength' => '254',
'#description' => t('The email address to which the message should be sent OR enter %author if you would like to send an e-mail to the original author of the post.', array('%author' => '%author')), '#description' => t('The email address to which the message should be sent OR enter %author if you would like to send an e-mail to the author of the original post.', array('%author' => '%author')),
); );
$form['subject'] = array( $form['subject'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Subject'), '#title' => t('Subject'),
'#default_value' => $context['subject'], '#default_value' => $context['subject'],
'#size' => '20',
'#maxlength' => '254', '#maxlength' => '254',
'#description' => t('The subject of the message.'), '#description' => t('The subject of the message.'),
); );
......
...@@ -1149,13 +1149,13 @@ function taxonomy_hook_info() { ...@@ -1149,13 +1149,13 @@ function taxonomy_hook_info() {
'taxonomy' => array( 'taxonomy' => array(
'taxonomy' => array( 'taxonomy' => array(
'insert' => array( 'insert' => array(
'runs when' => t('When a new category has been created'), 'runs when' => t('After saving a new category to the database'),
), ),
'update' => array( 'update' => array(
'runs when' => t('When a category has been updated'), 'runs when' => t('After saving an updated category to the database'),
), ),
'delete' => array( 'delete' => array(
'runs when' => t('When a category has been deleted') 'runs when' => t('After deleting a category')
), ),
), ),
), ),
......
; $Id$ ; $Id$
name = Actions name = Trigger
description = Enables triggerable Drupal actions. description = Enables actions to be fired on certain system events, such as when new content is created.
package = Core - optional package = Core - optional
version = VERSION version = VERSION
core = 6.x core = 6.x
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
/** /**
* Implementation of hook_install(). * Implementation of hook_install().
*/ */
function actions_install() { function trigger_install() {
// Create tables. // Create tables.
drupal_install_schema('actions'); drupal_install_schema('trigger');
// Do initial synchronization of actions in code and the database. // Do initial synchronization of actions in code and the database.
actions_synchronize(actions_list()); actions_synchronize(actions_list());
...@@ -15,7 +15,7 @@ function actions_install() { ...@@ -15,7 +15,7 @@ function actions_install() {
/** /**
* Implementation of hook_uninstall(). * Implementation of hook_uninstall().
*/ */
function actions_uninstall() { function trigger_uninstall() {
// Remove tables. // Remove tables.
drupal_uninstall_schema('actions'); drupal_uninstall_schema('trigger');
} }
<?php <?php
// $Id$ // $Id$
function actions_schema() { function trigger_schema() {
$schema['actions_assignments'] = array( $schema['trigger_assignments'] = array(
'fields' => array( 'fields' => array(
'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), 'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),