Review main Merged

21436[FEATURE] ViewHelper to display file sizes

Wouter Wolters CR +2 V +2 Normal +213 −0 updated 06/22/13, 22:18

Commit message

Simple ViewHelper that converts the size of a file to a human
readable string.

Usage:
{fileSize -> f:format.bytes()}

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Zbigniew Jacko +1
    • Philipp Gampe +1
  • Verified V +2
    • Christian Kuhn +2
    • Zbigniew Jacko +1
    • Philipp Gampe +1

Issues 2

Files 2

Review log 13

  1. Stefan Neufeind commented on patch set 1 V +1 CR +1 06/14/13, 23:36

    works for me (both tests as well as actual usage in a template)
  2. Philipp Gampe commented on patch set 1 CR -1 06/14/13, 23:37

    peta is missing in the middle of the sequence. If this is a backport, it might be missing in Flow too.

    BytesViewHelper.php:42

    kilo-, mega-, giga-, tera-, ***peta-***, exa-, zetta-, yotta-
  3. Stefan Neufeind commented on patch set 1 V 0 CR -2 06/14/13, 23:45

    Thanks Philipp. Great catch. I didn't expect *THAT* from a properly reviewed feature upstream. Filed a bug "upstream": http://forge.typo3.org/issues/49143
  4. Stefan Neufeind commented on patch set 1 06/15/13, 00:42

    Please let's wait until we can get this sorted out "upstream", in Flow Fluid). https://review.typo3.org/21446
  5. Wouter Wolters uploaded patch set 2 06/21/13, 15:59

  6. Mr. Jenkins commented on patch set 2 06/21/13, 16:00

  7. Stefan Neufeind commented on patch set 2 CR 0 06/21/13, 21:19

    BytesViewHelper.php:60

    is a simple is_numeric okay for us? Flow-team decided so for them. Would also allow numbers in hex-notation etc. Usually we'd use canBeInterpretedAsInteger and here now also canBeInterpretedAsFloat (currently under review - which I wrote for that purpose). I don't mind if is_numeric stays. But we should allow it in other parts as well then imho.
  8. Philipp Gampe commented on patch set 2 06/21/13, 22:23

    BytesViewHelper.php:60 Reply

    IMHO yes
  9. Philipp Gampe voted on patch set 2 CR +1 06/21/13, 22:26

  10. Philipp Gampe voted on patch set 2 V +1 06/21/13, 22:26

  11. Zbigniew Jacko voted on patch set 2 V +1 CR +1 06/22/13, 15:32

  12. Christian Kuhn voted on patch set 2 V +2 CR +2 06/22/13, 22:18

  13. Christian Kuhn merged patch set 3 06/22/13, 22:18