You are here

function rules_action_drupal_goto_upgrade in Rules 7.2

File

includes/rules.upgrade.inc, line 629
Contains code for upgrading rule configurations from 6.x-1.x to 7.x-2.x.

Code

function rules_action_drupal_goto_upgrade($element, $target) {
  $settings = $element['#settings'];
  $target->settings['url'] = $settings['path'];
  $target->settings['url'] .= $settings['query'] ? '?' . $settings['query'] : '';
  $target->settings['url'] .= $settings['fragment'] ? '#' . $settings['fragment'] : '';
  if ($settings['immediate']) {
    drupal_set_message(t("Warning: The 'immediate' option for the page redirect action has been dropped in Rules 2.x."));
  }
}