You are here

function messaging_update_1 in Messaging 6.2

Same name and namespace in other branches
  1. 5 messaging.install \messaging_update_1()
  2. 6.4 messaging.install \messaging_update_1()
  3. 6 messaging.install \messaging_update_1()
  4. 6.3 messaging.install \messaging_update_1()

Update method settings

File

./messaging.install, line 213

Code

function messaging_update_1() {
  $ret = array();
  if ($settings = variable_get('messaging_methods', array())) {
    foreach ($settings as $key => $info) {
      $info['subject_filter'] = $info['filter'];
      variable_set('messaging_method_' . $key, $info);
      $ret[] = array();
    }
    drupal_set_message('Your messaging methods have been updated. Please review the messaging settings.');
  }
  return $ret;
}