entityform_notifications.install in Entityform 7
File
entityform_notifications/entityform_notifications.install
View source
<?php
function entityform_notifications_update_7001(&$sandbox = NULL) {
$old_token = '[submitted-entityform';
$new_token = '[entityform';
$var_names = array(
'entityform_notify_submitter_subject',
'entityform_notify_submitter_body',
'entityform_notify_admin_subject',
'entityform_notify_admin_body',
);
$repaced = FALSE;
foreach ($var_names as $var_name) {
$var_value = variable_get($var_name);
if (!empty($var_value) && strstr($var_value, $old_token) !== FALSE) {
$var_value = str_replace($old_token, $new_token, $var_value);
variable_set($var_name, $var_value);
$repaced = TRUE;
}
}
if ($repaced) {
drupal_set_message(t('Replace references to old entityform tokens in variables.'));
}
}