Closed (fixed)
Project:
Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
5 Apr 2012 at 01:54 UTC
Updated:
19 Apr 2012 at 03:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidComment #2
dave reidCommitted with http://drupalcode.org/project/token.git/commit/873d9d0
Comment #4
rudolfbykerThis token is currently (almost?) always the same as [file:name]. Please read my comment on a "bug" in bulk_media_upload, here https://drupal.org/node/2106979#comment-8175081 for background info.
Is it supposed to use PATHINFO_BASENAME? Or did you mean to create a token for "filename without the extention"? For that, you need to use PATHINFO_FILENAME (available since php 5.2.0, see http://php.net/manual/en/function.pathinfo.php). Or maybe the idea was to strip all file extentions? For that a custom (though simple) regex is needed.
If this works as intended, then can we regard this as a feature request for a new token, which gets replaced by only the filename (minus the last n extentions)?
Comment #5
jhodgdonNote: I've repurposed #2106979: Could we have a file token that gives you the file name without extension to be a feature request for that other token.