function mailhandler_update_7212 in Mailhandler 7.2
Change feed config from 'mailbox' to 'source'.
File
- ./
mailhandler.install, line 326 - Install, update and uninstall functions for the Mailhandler module.
Code
function mailhandler_update_7212() {
$result = db_query('SELECT * FROM {feeds_source}');
while ($row = $result
->fetchAssoc()) {
$row['config'] = unserialize($row['config']);
if (isset($row['config']['MailhandlerFetcher']['mailbox'])) {
$row['config']['MailhandlerFetcher']['source'] = $row['config']['MailhandlerFetcher']['mailbox'];
unset($row['config']['MailhandlerFetcher']['mailbox']);
drupal_write_record('feeds_source', $row, array(
'id',
'feed_nid',
));
}
}
}