summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-03 10:58:57 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-03 10:58:57 -0700
commitd527a06e637fc3b90d5a2fb24e59531bda5af914 (patch)
tree0103b7a39861cdff7eac0436da9052a967011676 /modules/system
parent03ff5386dde0511016f45c544e958b2f961a5d54 (diff)
downloadbrdo-d527a06e637fc3b90d5a2fb24e59531bda5af914.tar.gz
brdo-d527a06e637fc3b90d5a2fb24e59531bda5af914.tar.bz2
Issue #978028 by Dave Reid: Fixed File token fixes: [file:description] does not exist and [file:owner] not using format_username().
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.tokens.inc11
1 files changed, 2 insertions, 9 deletions
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;
}
}