summaryrefslogtreecommitdiff
path: root/modules/system/system.tokens.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-10-02 14:49:10 +0000
committerDries Buytaert <dries@buytaert.net>2009-10-02 14:49:10 +0000
commitf2b51238b437bfdfe96dc5de30566bdd889cc5e3 (patch)
treecee8d85d69db9645007a48651377a777ba466017 /modules/system/system.tokens.inc
parent1184ed9fc9acf79ee33913dc6c1124ee8fa169ea (diff)
downloadbrdo-f2b51238b437bfdfe96dc5de30566bdd889cc5e3.tar.gz
brdo-f2b51238b437bfdfe96dc5de30566bdd889cc5e3.tar.bz2
- Patch #554088 by mr.baileys, sun | eaton: Changed Move user_mail_tokens() and emails to token system.
Diffstat (limited to 'modules/system/system.tokens.inc')
-rw-r--r--modules/system/system.tokens.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/system/system.tokens.inc b/modules/system/system.tokens.inc
index 07afe5deb..01687f0c2 100644
--- a/modules/system/system.tokens.inc
+++ b/modules/system/system.tokens.inc
@@ -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;