You are here

function og_update_5600 in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.install \og_update_5600()
  2. 5 og.install \og_update_5600()
  3. 5.3 og.install \og_update_5600()
  4. 5.7 og.install \og_update_5600()
  5. 6.2 og.install \og_update_5600()

Changes '@body' to '@node_teaser' in existing e-mail templates.

File

./og.install, line 276

Code

function og_update_5600() {
  $ret = array();
  $variables = array(
    'og_new_node_body',
    'og_new_node_subject',
  );
  foreach ($variables as $variable) {
    $value = variable_get($variable, '');
    if (!empty($value)) {
      variable_set($variable, str_replace('@body', '@node_teaser', $value));
      $ret[] = array(
        'success' => TRUE,
        'query' => "Replaced @body with @node_teaser in {$variable}",
      );
    }
  }
  return $ret;
}