function mass_contact_update_7000 in Mass Contact 7
Update the Attachment location setting, when upgrading from 6.x.
File
- ./
mass_contact.install, line 313 - Install, update and uninstall functions for the Mass Contact module.
Code
function mass_contact_update_7000(&$sandbox) {
$attachment_location = variable_get('mass_contact_attachment_location');
// If the setting was set to the 6.x default, update it to the 7.x default.
if (!empty($attachment_location) && $attachment_location == 'sites/default/files/mass_contact_attachments') {
variable_set('mass_contact_attachment_location', 'mass_contact_attachments');
}
else {
drupal_set_message(t('The path to the Mass Contact attachments was not set to the default setting. Since Drupal
7 changed the way it handles paths from Drupal 6, please check the <a href="@attachment-page">Attachment
location</a> setting and change it to something that will work with Drupal 7.', array(
'@attachment-page' => url('admin/config/system/mass_contact/settings/body'),
)), 'warning');
}
}