From d527a06e637fc3b90d5a2fb24e59531bda5af914 Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 3 Jul 2011 10:58:57 -0700 Subject: Issue #978028 by Dave Reid: Fixed File token fixes: [file:description] does not exist and [file:owner] not using format_username(). --- modules/system/system.tokens.inc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.tokens.inc b/modules/system/system.tokens.inc index 27d7dfdb0..56ddf2988 100644 --- a/modules/system/system.tokens.inc +++ b/modules/system/system.tokens.inc @@ -88,10 +88,6 @@ function system_token_info() { 'name' => t("File name"), 'description' => t("The name of the file on disk."), ); - $file['description'] = array( - 'name' => t("Description"), - 'description' => t("An optional human-readable description of the file."), - ); $file['path'] = array( 'name' => t("Path"), 'description' => t("The location of the file relative to Drupal root."), @@ -228,10 +224,6 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a $replacements[$original] = $sanitize ? check_plain($file->filename) : $file->filename; break; - case 'description': - $replacements[$original] = $sanitize ? check_plain($file->description) : $file->description; - break; - case 'path': $replacements[$original] = $sanitize ? check_plain($file->uri) : $file->uri; break; @@ -255,7 +247,8 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a case 'owner': $account = user_load($file->uid); - $replacements[$original] = $sanitize ? check_plain($account->name) : $account->name; + $name = format_username($account); + $replacements[$original] = $sanitize ? check_plain($name) : $name; break; } } -- cgit v1.2.3