While looking at adding view support for the files attached to project_release nodes, I just noticed that views_handler_field_upload_fid.inc has a bug in the handling of the [upload_fid-size] token.

In pre_render() when you initialize the $file data, you call format_size().

However, in add_self_tokens(), you call format_size() again.

So, you get stuff that looks like: "(170.74 KB bytes)" or "(42 bytes bytes)".

Seems like the format_size() in add_self_tokens() should go... I'll upload patches in a sec, stay tuned.

CommentFileSizeAuthor
#1 537870-1.fid-size.patch967 bytesdww

Comments

dww’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new967 bytes

Same bug in both HEAD (6.x-2.*) and DRUPAL-6--3. This patch applies cleanly to both branches. Trivial and obvious fix, so I'm marking this RTBC. ;)

dww’s picture

Status: Reviewed & tested by the community » Fixed

Earl decided to give me commit access for trivial fixes like this. Committed to HEAD and DRUPAL-6--3.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.