diff --git a/core/modules/actions/actions.admin.inc b/core/modules/actions/actions.admin.inc index ebf6b45..7acc1c8 100644 --- a/core/modules/actions/actions.admin.inc +++ b/core/modules/actions/actions.admin.inc @@ -15,12 +15,12 @@ function actions_admin_manage() { $options = array(); $unconfigurable = array(); - foreach ($actions_map as $key => $action) { - if ($action['configurable']) { - $options[$key] = $action['label'] . '...'; + foreach ($actions_map as $key => $array) { + if ($array['configurable']) { + $options[$key] = $array['label'] . '...'; } else { - $unconfigurable[] = $action; + $unconfigurable[] = $array; } } @@ -66,13 +66,17 @@ function actions_admin_manage() { } /** - * Form constructor for the actions overview page. + * Define the form for the actions overview page. * + * @param $form_state + * An associative array containing the current state of the form; not used. * @param $options * An array of configurable actions. + * @return + * Form definition. * - * @see actions_admin_manage_form_submit() * @ingroup forms + * @see actions_admin_manage_form_submit() */ function actions_admin_manage_form($form, &$form_state, $options = array()) { $form['parent'] = array( diff --git a/core/modules/actions/actions.module b/core/modules/actions/actions.module index e3633e3..f0106ee 100644 --- a/core/modules/actions/actions.module +++ b/core/modules/actions/actions.module @@ -504,11 +504,14 @@ function actions_action_info() { } /** - * Returns a form definition to configure the 'actions_send_email_action' action. + * Return a form definition so the Send email action can be configured. * * @param $context * Default values (if we are editing an existing action instance). * + * @return + * Form definition. + * * @see actions_send_email_action_validate() * @see actions_send_email_action_submit() */ @@ -633,7 +636,7 @@ function actions_message_action_form($context) { '#default_value' => isset($context['message']) ? $context['message'] : '', '#required' => TRUE, '#rows' => '8', - '#description' => t('The message to be displayed to the current user. You may include placeholders like [user:name], [node:title] and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'), + '#description' => t('The message to be displayed to the current user. You may include placeholders like [node:title], [user:name], and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'), ); return $form; } @@ -658,11 +661,9 @@ function actions_message_action_submit($form, $form_state) { * - Other elements will be used as the data for token replacement in * the message. * - * Action functions are declared by modules by implementing hook_action_info(). - * Modules can cause action functions to run by calling actions_do(). * @ingroup actions */ -function actions_message_action($entity, $context) { +function actions_message_action(&$entity, $context = array()) { if (empty($context['node'])) { $context['node'] = $entity; }