function mailhandler_update_6207 in Mailhandler 6.2
Changes 'Body' importer mapping source to 'Body (HTML)'.
File
- ./
mailhandler.install, line 379 - Install, update and uninstall functions for the Mailhandler module.
Code
function mailhandler_update_6207() {
$ret = array();
$result = db_query('SELECT * FROM {feeds_importer}');
while ($row = db_fetch_array($result)) {
$row['config'] = unserialize($row['config']);
if ($row['config']['parser']['plugin_key'] == 'MailhandlerParser') {
foreach ($row['config']['processor']['config']['mappings'] as $m => $mapping) {
if ($mapping['source'] == 'origbody') {
$row['config']['processor']['config']['mappings'][$m]['source'] = 'body_html';
}
}
drupal_write_record('feeds_importer', $row, 'id');
}
}
return $ret;
}