Review main Merged

3178[FEATURE] Rounding functionality in stdWrap

Kilian Hann CR +2 V +2 Normal +114 −0 updated 06/03/13, 20:49

Commit message

Provides rounding functionality (round, ceil, floor) to stdWrap.

Review

  • Code review CR +2
    • Andreas Wolf +2
  • Verified V +2
    • Andreas Wolf +2

Issues 1

Files 2

Review log 37

Show 12 earlier messages
  1. Andreas Wolf merged patch set 1 07/11/11, 17:15

  2. Georg Ringer commented on patch set 1 07/11/11, 17:15

    I would prefer that you didn't submit this
    functionionality > functionality

    class.tslib_content.php:4140

    it will be a string given by stdWrap most of the time

    class.tslib_content.php:4144

    public, private?

    class.tslib_content.php:4155

    CGL: +1 tab for break;

    class.tslib_content.php:4164

    debug statement shouldn't be in there I guess?
  3. Chris topher commented on patch set 1 07/11/11, 17:15

    I would prefer that you didn't submit this See inline comments.

    class.tslib_content.php:2332

    You don't mean "numberFormat", but "round" in the comment.

    class.tslib_content.php:2335

    The default value '' for $content seems to be wrong. The PHP functions ceil(), floor() and round() need the type float. Maybe better set the default to '0'.

    class.tslib_content.php:4152

    Add a space character between the brackets.

    class.tslib_content.php:4162

    $decimals must be an integer. Maybe you could still add a check for that (like you did for $floatVal)?

    class.tslib_content.php:4164

    Remove this line.
  4. Mr. Jenkins commented on patch set 1 07/11/11, 17:15

  5. Stefan Neufeind commented on patch set 2 07/11/11, 17:15

    Looks good to me, but someone else must approve
  6. Georg Ringer commented on patch set 2 07/11/11, 17:15

    Looks good to me, but someone else must approve
  7. Chris topher commented on patch set 2 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve
  8. Chris topher commented on patch set 2 07/11/11, 17:15

    (1 inline comment) Hi Kilian, could you still add a check for $decimal being an integer? If it is not, you will get a warning "round() expects parameter 2 to be long, string given". Sorry that I did not notice that before.
  9. Mr. Jenkins commented on patch set 2 07/11/11, 17:15

  10. Kilian Hann uploaded patch set 2 07/11/11, 17:15

  11. Stefan Neufeind commented on patch set 4 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve
  12. Stefan Neufeind commented on patch set 4 07/11/11, 17:15

    @Philipp: number-format should be dependent on the locale set - though I'm not sure if that would require to the locale of the current page or only to the locale set for PHP
  1. Xavier Perseguers commented on patch set 4 07/11/11, 17:15

    (4 inline comments) Looks quite good but please take my comments into account
  2. Georg Ringer commented on patch set 4 07/11/11, 17:15

    Looks good to me, but someone else must approve
  3. Steffen Gebert uploaded patch set 4 07/11/11, 17:15

  4. Chris topher commented on patch set 4 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve
  5. Philipp Gampe commented on patch set 4 07/11/11, 17:15

    You should also mention, that this will only work on "english" numbers meaning if you have a point as decimal divider. Using the german notation with comma will not work.

    class.tslib_content.php:4161

    CGL says we need a comment here because of the fall trough
  6. Philipp Gampe commented on patch set 4 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve works for me
  7. Jo Hasenau commented on patch set 4 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve
  8. Mr. Jenkins commented on patch set 3 07/11/11, 17:15

  9. Mr. Jenkins commented on patch set 4 07/11/11, 17:15

  10. Kilian Hann uploaded patch set 3 07/11/11, 17:15

  11. Andreas Wolf uploaded patch set 7 07/11/11, 17:15

  12. Andreas Wolf uploaded patch set 8 07/11/11, 17:15

  13. Andreas Wolf commented on patch set 8 V 0 07/11/11, 17:15

    by team member; Looks good to me, approved Pushing after reviewing and adding unit tests. Documentation still has to be added.
  14. Stefan Neufeind commented on patch set 6 07/11/11, 17:15

    PS: needs followup in stdWrap-documentation!
  15. Stefan Neufeind uploaded patch set 6 07/11/11, 17:15

  16. Stefan Neufeind commented on patch set 6 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve * rolled in the nitpicks from previous commit * code says it "defaults to round". So now we allow mytext.round = 1 as well * verified that it also works fine together with an additional numberFormat: page.5 = TEXT page.5.value = 2.753 page.5.round.roundType = round page.5.round.decimals = 2 page.5.numberFormat.decimals = 10
  17. Stefan Neufeind commented on patch set 6 07/11/11, 17:15

    (1 inline comment) don't think a fall-through-comment is needed
  18. Xavier Perseguers commented on patch set 5 3 comments 07/11/11, 17:15

    Looks good to me, but someone else must approve Final +1 with comments taken into account. Will test afterwards and possibly merge it if +1 quota is OK
  19. Georg Ringer commented on patch set 5 V 0 07/11/11, 17:15

    by team member; Looks good to me, approved
  20. Philipp Gampe commented on patch set 6 1 comment 07/11/11, 17:15

    Verified; Looks good to me, but someone else must approve
  21. Mr. Jenkins commented on patch set 5 07/11/11, 17:15

  22. Mr. Jenkins commented on patch set 6 07/11/11, 17:15

  23. Mr. Jenkins commented on patch set 7 07/11/11, 17:15

  24. Kilian Hann uploaded patch set 5 07/11/11, 17:15

  25. Mr. Jenkins commented on patch set 8 07/11/11, 17:15