function mailhandler_update_6208 in Mailhandler 6.2
Adds default limit and encoding to mailboxes.
File
- ./
mailhandler.install, line 399 - Install, update and uninstall functions for the Mailhandler module.
Code
function mailhandler_update_6208() {
$ret = array();
$result = db_query('SELECT * FROM {mailhandler_mailbox}');
while ($row = db_fetch_array($result)) {
$row['settings'] = unserialize($row['settings']);
if (empty($row['settings']['limit'])) {
$row['settings']['limit'] = 0;
}
if (empty($row['settings']['encoding'])) {
$row['settings']['encoding'] = 'UTF-8';
}
if (empty($row['settings']['fromheader'])) {
$row['settings']['fromheader'] = 'From';
}
drupal_write_record('mailhandler_mailbox', $row, 'mid');
}
return $ret;
}