function rules_upgrade_element_parameter_settings
Converts the settings for a given parameter.
18 calls to rules_upgrade_element_parameter_settings()
- rules_action_add_node_upgrade in includes/
rules.upgrade.inc - rules_action_delete_node_upgrade in includes/
rules.upgrade.inc - rules_action_invoke_set_upgrade in includes/
rules.upgrade.inc - rules_action_load_comment_upgrade in includes/
rules.upgrade.inc - rules_action_load_node_upgrade in includes/
rules.upgrade.inc
File
-
includes/
rules.upgrade.inc, line 352
Code
function rules_upgrade_element_parameter_settings($element, $target, $name, $new_name = NULL) {
if (!isset($new_name)) {
$new_name = $name;
}
if (isset($element['#settings'][$name])) {
// In case a single token has been used, just convert it to a data
// selector.
if (is_string($element['#settings'][$name]) && preg_match("/\\[(.*)\\]\$/", $element['#settings'][$name], $matches)) {
$target->settings[$new_name . ':select'] = $matches[1];
}
else {
$target->settings[$new_name] = $element['#settings'][$name];
}
}
elseif (isset($element['#settings']['#argument map'][$name])) {
$target->settings[$new_name . ':select'] = $element['#settings']['#argument map'][$name];
}
}