commit 225506436da768c022fe650318d950b4225b5f07
Author: Chris Burgess <chris@giantrobot.co.nz>
Date:   Sun Dec 10 09:57:04 2017 +1300

    Issue #2806011. Avoid calling drupal_goto() directly from rules actions.

diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_action_schedule.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_action_schedule.inc
index 4b6fb43..5ced70b 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_action_schedule.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_action_schedule.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_action_schedule_action_info() {
 
 function civicrm_entity_actions_action_schedule_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-action_schedule
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_action_schedule_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-action_schedule
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_action_schedule_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-action_schedule
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_action_schedule_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-action_schedule
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_activity.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_activity.inc
index e1dcdbc..d71f2a5 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_activity.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_activity.inc
@@ -51,28 +51,28 @@ function civicrm_entity_actions_activity_action_info() {
 
 function civicrm_entity_actions_activity_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-activity
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_activity_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-activity
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_activity_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-activity
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_activity_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-activity
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
 
 /**
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_address.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_address.inc
index bba39ee..a919307 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_address.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_address.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_address_action_info() {
 
 function civicrm_entity_actions_address_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-address
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_address_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-address
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_address_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-address
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_address_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-address
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_campaign.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_campaign.inc
index df7c70c..5303e3b 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_campaign.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_campaign.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_campaign_action_info() {
 
 function civicrm_entity_actions_campaign_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-campaign
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_campaign_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-campaign
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_campaign_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-campaign
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_campaign_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-campaign
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_case.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_case.inc
index 4fab298..eb28bb7 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_case.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_case.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_case_action_info() {
 
 function civicrm_entity_actions_case_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-case
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_case_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-case
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_case_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-case
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_case_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-case
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_contact.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_contact.inc
index c19aecf..3247e4b 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_contact.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_contact.inc
@@ -61,28 +61,28 @@ function civicrm_entity_actions_contact_action_info() {
 
 function civicrm_entity_actions_contact_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contact
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_contact_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contact
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_contact_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contact
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_contact_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contact
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
 
 /**
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution.inc
index 1dceef4..d78a867 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_contribution_action_info() {
 
 function civicrm_entity_actions_contribution_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_contribution_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_contribution_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_contribution_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_page.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_page.inc
index f165843..89f07d1 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_page.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_page.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_contribution_page_action_info() {
 
 function civicrm_entity_actions_contribution_page_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution_page
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_contribution_page_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution_page
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_contribution_page_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution_page
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_contribution_page_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution_page
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_recur.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_recur.inc
index 6917428..d298728 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_recur.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_contribution_recur.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_contribution_recur_action_info() {
 
 function civicrm_entity_actions_contribution_recur_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_contribution_recur_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_contribution_recur_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_contribution_recur_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-contribution
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_country.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_country.inc
index 240310d..01140c1 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_country.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_country.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_country_action_info() {
 
 function civicrm_entity_actions_country_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-country
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_country_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-country
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_country_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-country
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_country_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-country
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_custom_field.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_custom_field.inc
index b31230e..7258897 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_custom_field.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_custom_field.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_custom_field_action_info() {
 
 function civicrm_entity_actions_custom_field_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_field
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_custom_field_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_field
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_custom_field_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_field
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_custom_field_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_field
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_custom_group.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_custom_group.inc
index 2de7cf9..b3cd227 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_custom_group.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_custom_group.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_custom_group_action_info() {
 
 function civicrm_entity_actions_custom_group_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_group
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_custom_group_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_group
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_custom_group_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_group
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_custom_group_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-custom_group
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_email.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_email.inc
index 0785016..629b58e 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_email.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_email.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_email_action_info() {
 
 function civicrm_entity_actions_email_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-email
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_email_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-email
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_email_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-email
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_email_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-email
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_entity_tag.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_entity_tag.inc
index bde69dd..0fe5fe0 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_entity_tag.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_entity_tag.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_entity_tag_action_info() {
 
 function civicrm_entity_actions_entity_tag_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-entity_tag
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_entity_tag_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-entity_tag
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_entity_tag_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-entity_tag
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_entity_tag_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-entity_tag
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_event.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_event.inc
index abc84d0..17845f1 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_event.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_event.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_event_action_info() {
 
 function civicrm_entity_actions_event_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-event
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_event_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-event
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_event_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-event
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_event_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-event
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_financial_type.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_financial_type.inc
index 1093394..f008df6 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_financial_type.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_financial_type.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_financial_type_action_info() {
 
 function civicrm_entity_actions_financial_type_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-financial_type
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_financial_type_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-financial_type
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_financial_type_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-financial_type
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_financial_type_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-financial_type
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_grant.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_grant.inc
index 553b445..0cedf16 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_grant.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_grant.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_grant_action_info() {
 
 function civicrm_entity_actions_grant_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-grant
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_grant_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-grant
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_grant_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-grant
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_grant_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-grant
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_group.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_group.inc
index 0c53c47..7b959da 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_group.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_group.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_group_action_info() {
 
 function civicrm_entity_actions_group_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-group
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_group_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-group
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_group_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-group
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_group_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-group
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_im.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_im.inc
index 98b5116..47262b4 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_im.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_im.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_im_action_info() {
 
 function civicrm_entity_actions_im_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-im
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_im_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-im
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_im_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-im
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_im_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-im
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_membership.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_membership.inc
index 3049cc9..29f4a62 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_membership.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_membership.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_membership_action_info() {
 
 function civicrm_entity_actions_membership_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_membership_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_membership_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_membership_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_membership_type.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_membership_type.inc
index ed46102..4c7a41a 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_membership_type.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_membership_type.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_membership_type_action_info() {
 
 function civicrm_entity_actions_membership_type_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership_type
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_membership_type_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership_type
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_membership_type_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership_type
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_membership_type_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-membership_type
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_note.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_note.inc
index f97872d..db9581b 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_note.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_note.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_note_action_info() {
 
 function civicrm_entity_actions_note_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-note
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_note_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-note
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_note_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-note
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_note_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-note
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_participant.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_participant.inc
index 2e270fb..2eefeab 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_participant.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_participant.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_participant_action_info() {
 
 function civicrm_entity_actions_participant_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-participant
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_participant_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-participant
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_participant_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-participant
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_participant_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-participant
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_phone.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_phone.inc
index 590c464..8d7d5c4 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_phone.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_phone.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_phone_action_info() {
 
 function civicrm_entity_actions_phone_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-phone
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_phone_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-phone
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_phone_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-phone
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_phone_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-phone
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_pledge.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_pledge.inc
index 5a640c0..95a9077 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_pledge.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_pledge.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_pledge_action_info() {
 
 function civicrm_entity_actions_pledge_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_pledge_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_pledge_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_pledge_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_pledge_payment.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_pledge_payment.inc
index eb56753..2e65ae9 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_pledge_payment.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_pledge_payment.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_pledge_payment_action_info() {
 
 function civicrm_entity_actions_pledge_payment_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge_payment
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_pledge_payment_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge_payment
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_pledge_payment_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge_payment
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_pledge_payment_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-pledge_payment
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_price_field.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_price_field.inc
index 54af8b8..e9fe56c 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_price_field.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_price_field.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_price_field_action_info() {
 
 function civicrm_entity_actions_price_field_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_price_field_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_price_field_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_price_field_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_price_field_value.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_price_field_value.inc
index b7bead1..41f8ce8 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_price_field_value.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_price_field_value.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_price_field_value_action_info() {
 
 function civicrm_entity_actions_price_field_value_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field_value
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_price_field_value_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field_value
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_price_field_value_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field_value
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_price_field_value_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_field_value
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_price_set.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_price_set.inc
index 284d41a..9b397ba 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_price_set.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_price_set.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_price_set_action_info() {
 
 function civicrm_entity_actions_price_set_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_set
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_price_set_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_set
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_price_set_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_set
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_price_set_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-price_set
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_relationship.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_relationship.inc
index b01290d..91c8ee4 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_relationship.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_relationship.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_relationship_action_info() {
 
 function civicrm_entity_actions_relationship_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_relationship_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_relationship_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_relationship_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_relationship_type.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_relationship_type.inc
index c39f512..cd2d554 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_relationship_type.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_relationship_type.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_relationship_type_action_info() {
 
 function civicrm_entity_actions_relationship_type_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship_type
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_relationship_type_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship_type
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_relationship_type_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship_type
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_relationship_type_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-relationship_type
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_survey.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_survey.inc
index c4ae90c..ffa3295 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_survey.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_survey.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_survey_action_info() {
 
 function civicrm_entity_actions_survey_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-survey
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_survey_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-survey
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_survey_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-survey
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_survey_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-survey
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
diff --git a/modules/civicrm_entity_actions/civicrm_entity_actions_tag.inc b/modules/civicrm_entity_actions/civicrm_entity_actions_tag.inc
index 3a2fd67..880adf5 100644
--- a/modules/civicrm_entity_actions/civicrm_entity_actions_tag.inc
+++ b/modules/civicrm_entity_actions/civicrm_entity_actions_tag.inc
@@ -41,26 +41,26 @@ function civicrm_entity_actions_tag_action_info() {
 
 function civicrm_entity_actions_tag_add_action($entity, $context = array()) {
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-tag
-  drupal_goto($base_url . '/add');
+  rules_action_drupal_goto($base_url . '/add');
 }
 
 function civicrm_entity_actions_tag_view_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-tag
-  drupal_goto($base_url . '/' . $entity_id);
+  rules_action_drupal_goto($base_url . '/' . $entity_id);
 }
 
 function civicrm_entity_actions_tag_edit_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-tag
-  drupal_goto($base_url . '/' . $entity_id . '/edit');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/edit');
 }
 
 function civicrm_entity_actions_tag_delete_action($entity, $context = array()) {
   $info = entity_get_info($context['entity_type']);
   $entity_id = $entity->{$info['entity keys']['id']};
   $base_url = str_replace('_', '-', $context['entity_type']); // civicrm-tag
-  drupal_goto($base_url . '/' . $entity_id . '/delete');
+  rules_action_drupal_goto($base_url . '/' . $entity_id . '/delete');
 }
\ No newline at end of file
