Index: includes/actions.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/actions.inc,v
retrieving revision 1.26
diff -u -p -r1.26 actions.inc
--- includes/actions.inc	18 Mar 2009 09:50:46 -0000	1.26
+++ includes/actions.inc	31 May 2009 02:53:47 -0000
@@ -47,7 +47,7 @@ function actions_do($action_ids, $object
   }
   $actions = array();
   $available_actions = actions_list();
-  $result = array();
+  $actions_result = array();
   if (is_array($action_ids)) {
     $conditions = array();
     foreach ($action_ids as $action_id) {
@@ -82,11 +82,11 @@ function actions_do($action_ids, $object
       if (is_numeric($action_id)) {
         $function = $params['callback'];
         $context = array_merge($context, $params);
-        $result[$action_id] = $function($object, $context, $a1, $a2);
+        $actions_result[$action_id] = $function($object, $context, $a1, $a2);
       }
       // Singleton action; $action_id is the function name.
       else {
-        $result[$action_id] = $action_id($object, $context, $a1, $a2);
+        $actions_result[$action_id] = $action_id($object, $context, $a1, $a2);
       }
     }
   }
@@ -97,15 +97,15 @@ function actions_do($action_ids, $object
       $action = db_query("SELECT callback, parameters FROM {actions} WHERE aid = :aid", array(':aid' => $action_ids))->fetchObject();
       $function = $action->callback;
       $context = array_merge($context, unserialize($action->parameters));
-      $result[$action_ids] = $function($object, $context, $a1, $a2);
+      $actions_result[$action_ids] = $function($object, $context, $a1, $a2);
     }
     // Singleton action; $action_ids is the function name.
     else {
-      $result[$action_ids] = $action_ids($object, $context, $a1, $a2);
+      $actions_result[$action_ids] = $action_ids($object, $context, $a1, $a2);
     }
   }
   $stack--;
-  return $result;
+  return $actions_result;
 }
 
 /**
Index: modules/trigger/trigger.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.test,v
retrieving revision 1.10
diff -u -p -r1.10 trigger.test
--- modules/trigger/trigger.test	27 May 2009 18:07:28 -0000	1.10
+++ modules/trigger/trigger.test	31 May 2009 02:53:48 -0000
@@ -127,25 +127,51 @@ class TriggerCronTestCase extends Drupal
   }
 
   /**
-   * Assign an action to a trigger, then pull the trigger, and make sure the actions fire.
+   * Test assigning multiple actions to the cron trigger.
+   *
+   * This test ensures that both simple and multiple complex actions
+   * succeed properly. This is done in the cron trigger test because
+   * cron allows passing multiple actions in at once.
    */
   function testActionsCron() {
-    $action = 'trigger_test_system_cron_action';
-    $hash = md5($action);
-
-    // Create administrative user.
+    // Create an administrative user.
     $test_user = $this->drupalCreateUser(array('administer actions'));
     $this->drupalLogin($test_user);
-
-    // Select our test action and assign it to a cron run trigger.
-    $edit = array('aid' => $hash);
+ 
+    // Assign a non-configurable action to the cron run trigger.
+    $edit = array('aid' => md5('trigger_test_system_cron_action'));
     $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
-
+ 
+    // Assign a configurable action to the cron trigger.
+    $hash = md5('trigger_test_system_cron_conf_action');
+    $action_description = $this->randomName();
+    $edit = array(
+      'actions_description' => $action_description,
+      'subject' => $action_description,
+    );
+    $this->drupalPost('admin/settings/actions/configure/' . $hash, $edit, t('Save'));
+    $edit = array('aid' => md5('1'));
+    $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
+ 
+    // Add a second configurable action to the cron trigger.
+    $action_description = $this->randomName();
+    $edit = array(
+      'actions_description' => $action_description,
+      'subject' => $action_description,
+    );
+    $this->drupalPost('admin/settings/actions/configure/' . $hash, $edit, t('Save'));
+    $edit = array('aid' => md5('2'));
+    $this->drupalPost('admin/build/trigger/cron', $edit, t('Assign'));
+ 
     // Force a cron run.
     drupal_cron_run();
-
-    // Make sure the actions fire.
+ 
+    // Make sure the non-configurable action has fired.
     $action_run = variable_get('trigger_test_system_cron_action', FALSE);
     $this->assertTrue($action_run, t('Check that the cron run triggered the test action.'));
+ 
+    // Make sure that both configurable actions have fired.
+    $action_run = variable_get('trigger_test_system_cron_conf_action', 0) == 2;
+    $this->assertTrue($action_run, t('Check that the cron run triggered both complex actions.'));
   }
 }
Index: modules/trigger/tests/trigger_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/tests/trigger_test.module,v
retrieving revision 1.1
diff -u -p -r1.1 trigger_test.module
--- modules/trigger/tests/trigger_test.module	27 May 2009 16:29:05 -0000	1.1
+++ modules/trigger/tests/trigger_test.module	31 May 2009 02:53:48 -0000
@@ -20,6 +20,14 @@ function trigger_test_action_info() {
         'cron' => array('run'),
       ),
     ),
+    'trigger_test_system_cron_conf_action' => array(
+      'type' => 'system',
+      'description' => t('Cron test configurable action'),
+      'configurable' => TRUE,
+      'hooks' => array(
+        'cron' => array('run'),
+      ),
+    ),
   );
 }
 
@@ -30,3 +38,40 @@ function trigger_test_system_cron_action
   // Indicate successful execution by setting a persistent variable.
   variable_set('trigger_test_system_cron_action', TRUE);
 }
+
+/**
+ * Implement a configurable Drupal action.
+ */
+function trigger_test_system_cron_conf_action($object, $context) {
+  // Indicate successful execution by incrementing a persistent variable.
+  $value = variable_get('trigger_test_system_cron_conf_action', 0) + 1;
+  variable_set('trigger_test_system_cron_conf_action', $value);
+}
+
+/**
+ * Return a form so the cron test configurable action can be configured.
+ */
+function trigger_test_system_cron_conf_action_form($context) {
+  if (!isset($context['subject'])) {
+    $context['subject'] = '';
+  }
+  $form['subject'] = array(
+    '#type' => 'textfield',
+    '#default_value' => $context['subject'],
+    '#maxlength' => '254',
+  );
+  return $form;
+}
+
+/**
+ * Process trigger_test_system_cron_conf_action form submissions.
+ */
+function trigger_test_system_cron_conf_action_submit($form, $form_state) {
+  $form_values = $form_state['values'];
+  // Process the HTML form to store configuration. The keyed array that
+  // we return will be serialized to the database.
+  $params = array(
+    'subject' => $form_values['subject'],
+  );
+  return $params;
+}
