You are here

function invite_update_7 in Invite 6.2

Same name and namespace in other branches
  1. 5.2 invite.install \invite_update_7()
  2. 5 invite.install \invite_update_7()
  3. 7.2 invite.install \invite_update_7()

Switch to token.module.

File

./invite.install, line 202
Installation file for invite module.

Code

function invite_update_7() {
  $ret = array();
  $old = array(
    '@site',
    '@join_link',
    '@homepage',
    '@message',
    '@inviter',
  );
  $new = array(
    '[site-name]',
    '[join-link]',
    '[site-url]',
    '[invite-message]',
    '[inviter]',
  );
  _invite_update_tokens('invite_default_mail_template', $old, $new);
  $ret[] = array(
    'query' => 'The message tokens for the invite module have been successfully updated.',
    'success' => TRUE,
  );
  drupal_set_message(strtr('Please note that invite now depends on the %token module.', array(
    '%token' => l('token', 'http://drupal.org/project/token', array(
      'attributes' => array(
        'target' => '_blank',
      ),
      'absolute' => TRUE,
    )),
  )), 'error');
  return $ret;
}