Skip to content
Snippets Groups Projects
Commit 9530e545 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #28868 by Ber: reset user mail variables.

parent d2865f2a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1674,3 +1674,27 @@ function system_update_176() {
$ret[] = update_sql('ALTER TABLE {filter_formats} ADD UNIQUE (name)');
return $ret;
}
function system_update_177() {
$message_ids = array(
'welcome_subject',
'welcome_body',
'approval_subject',
'approval_body',
'pass_subject',
'pass_body',
);
foreach ($message_ids as $message_id) {
if ($admin_setting = variable_get('user_mail_' . $message_id, FALSE)) {
$admin_setting = '<pre>'. $admin_setting .'</pre>'; //else it renders horrible
watchdog('legacy', $admin_setting);
$last = db_fetch_object(db_query('SELECT max(wid) wid FROM {watchdog}'));
variable_del('user_mail_'. $message_id); //deleting is requird, because _user_mail_text() checks for existance.
$i++;
$ret[$i]['query'] = l(t('The mail template %message_id is reset to the default, and the old one is saved.', array('%message_id' => 'user_mail_'. $message_id)),'admin/logs/event/'. $last->wid);
$ret[$i]['success'] = TRUE;
}
}
return $ret;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment