summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Haug2010-12-06 03:46:09 +0000
committerNathan Haug2010-12-06 03:46:09 +0000
commitfa7b239362caa99f6ce2f8c0b6a79968e3e00922 (patch)
tree250d0fe00f9adba77738f48309fdccb0602a6a3f
parentcfbc305677594f6a657e555a0a5e5d85cf34a304 (diff)
#848528 by alexpott: Token replacement filefield-onlyname doesn't work for php older than 5.2.
-rw-r--r--filefield.token.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/filefield.token.inc b/filefield.token.inc
index b2e4b70..2b889c8 100644
--- a/filefield.token.inc
+++ b/filefield.token.inc
@@ -58,7 +58,7 @@ function filefield_token_values($type, $object = NULL) {
}
if (!isset($tokens['filefield-extension'])) {
$info = pathinfo($item['filename']);
- $tokens['filefield-onlyname'] = $info['filename'];
+ $tokens['filefield-onlyname'] = basename($info['basename'], '.'. $info['extension']);
$tokens['filefield-extension'] = $info['extension'];
}
}