Commit f2b51238 authored by Dries's avatar Dries

- Patch #554088 by mr.baileys, sun | eaton: Changed Move user_mail_tokens()...

- Patch #554088 by mr.baileys, sun | eaton: Changed Move user_mail_tokens() and emails to token system.
parent 1184ed9f
......@@ -48,6 +48,10 @@ function system_token_info() {
'name' => t("URL"),
'description' => t("The URL of the site's front page."),
);
$site['url-brief'] = array(
'name' => t("URL (brief)"),
'description' => t("The URL of the site's front page without the protocol."),
);
$site['login-url'] = array(
'name' => t("Login page"),
'description' => t("The URL of the site's login page."),
......@@ -181,6 +185,10 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
$replacements[$original] = url('<front>', $url_options);
break;
case 'url-brief':
$replacements[$original] = preg_replace('!^https?://!', '', url('<front>', $url_options));
break;
case 'login-url':
$replacements[$original] = url('user', $url_options);
break;
......
......@@ -406,7 +406,7 @@ function user_admin_settings() {
);
// These email tokens are shared for all settings, so just define
// the list once to help ensure they stay in sync.
$email_token_help = t('Available variables are:') . ' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url, !cancel_url.';
$email_token_help = t('Available variables are:') . ' [site:name], [site:url], [user:name], [user:mail], [site:login-url], [user:edit-url], [user:password], [user:one-time-login-url], [user:cancel-url].';
$form['email_admin_created'] = array(
'#type' => 'fieldset',
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment