40291[!!!][FEATURE] Support IEC/SI units in file size formatting
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Alexander Opitz +1
-
Verified V +2
- Christian Kuhn +2
- Alexander Opitz +1
Issues 1
Files 4
- typo3/sysext/backend/Tests/Unit/Form/Element/NoneElementTest.php+2 −2
- typo3/sysext/core/Classes/Utility/GeneralUtility.php15+37 −35
- typo3/sysext/core/Documentation/Changelog/master/Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst4new+37 −0
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.phpbinary
Review log 33
Show 8 earlier messages
-
Pierrick Caillon uploaded patch set 1 06/16/15, 11:44
-
Pierrick Caillon updated the commit message in patch set 2 06/16/15, 11:46
-
Mathias Brodala uploaded patch set 3 06/16/15, 13:14
-
Mathias Brodala commented on patch set 3 06/16/15, 13:15
Reworded commit message, removed debug function call and scared away all the bees. -
Wouter Wolters commented on patch set 3 CR -1 06/16/15, 15:31
GeneralUtility.php:926(int)GeneralUtility.php:927do a normal if (bla || bla2) check here. No in_array pleaseFeature-22175-SupportSpecifyingIecOrSiUnitsWhenFormattingFileSize.rst:2[!!!][FEATURE] should be removed -
Christian Kuhn commented on patch set 3 06/16/15, 15:55
general +1 from me when the small issues by wouter are fixed. -
Christian Kuhn commented on patch set 3 06/16/15, 15:57
[!!!] is not needed if this is not breaking ... or, if breaking: it should be stated more clearly (especially in the .rst file) what exactly is different (maybe with example at best). -
Pierrick Caillon uploaded patch set 4 06/16/15, 17:04
-
Wouter Wolters commented on patch set 4 06/16/15, 17:07
GeneralUtility.php:927we know $base is an integer so we should use !== for the check. Strict comparison is quicker.Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst:2Remove this please [!!!][FEATURE] -
Pierrick Caillon commented on patch set 4 06/16/15, 17:28
Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst:2ReplyThe default output is different from before. Shouldn't it be breaking ? Or what do you expect? -
Alexander Opitz commented on patch set 4 CR -1 06/17/15, 06:40
GeneralUtility.php:915put the labels in an array, we do not need to split them every time.GeneralUtility.php:947Can we replace this for loop by one out of the examples on http://stackoverflow.com/questions/2510434/format-bytes-to-kilobytes-megabytes-gigabytes ? -
Mathias Brodala commented on patch set 4 06/17/15, 07:55
Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst:2ReplyI think he means that this part should be removed from the subject line of this .rst file, not from the commit message. Please see https://forger.typo3.org/standard/rst -
Pierrick Caillon uploaded patch set 5 06/17/15, 09:18
-
Pierrick Caillon uploaded patch set 6 06/17/15, 09:22
-
Andreas Kienast commented on patch set 6 06/17/15, 09:39
Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst:2Please drop this -
Pierrick Caillon uploaded patch set 7 06/17/15, 10:03
-
Christian Kuhn commented on patch set 7 CR -1 06/17/15, 10:05
on it. let's finish this now. -
Christian Kuhn uploaded patch set 8 06/17/15, 10:22
-
Christian Kuhn uploaded patch set 9 06/17/15, 10:25
-
Christian Kuhn voted on patch set 9 CR +1 V +1 06/17/15, 10:31
-
Alexander Opitz commented on patch set 9 CR -1 06/17/15, 10:34
GeneralUtility.php:914Maybe I would also remove the space char, so we can later decide to use "1kB" or "1 kB"GeneralUtility.php:915The Si Präfix for kilo is "k" not "K".GeneralUtility.php:941$labels is an array if "isset($defaultFormats[$labels])" is TRUE so move this in the else part?GeneralUtility.php:942Can $sizeInBytes be lower then 0? No, so I think this isn't needed. -
Andreas Kienast commented on patch set 9 CR -1 06/17/15, 10:43
We need a breaking rest document -
Christian Kuhn commented on patch set 9 06/17/15, 10:49
ok, i'm out. andreas / alex: could you push something to incorporate your thought, please? -
Pierrick Caillon commented on patch set 9 06/17/15, 11:00
I'll push an update to fix the wrong 'k' for SI units.GeneralUtility.php:914ReplyPoint #15 of http://physics.nist.gov/cuu/Units/checklist.html says it is mandatory.GeneralUtility.php:915ReplyThat's true, I'll fix it.GeneralUtility.php:942ReplyThe logarithm of negative integer is not supported (NaN). Safety check. -
Pierrick Caillon uploaded patch set 10 06/17/15, 11:08
-
Christian Kuhn commented on patch set 10 CR +1 V +1 06/17/15, 11:11
i don't think we need a breaking .rst here - the feature file explains this pretty well and the breaking file would probably only duplicate that. andreas, to you see urgent need for that? -
Andreas Kienast commented on patch set 10 06/17/15, 11:34
Fine with me, go ahead -
Alexander Opitz commented on patch set 10 V +2 CR -1 06/17/15, 14:17
GeneralUtility.php:941Please move the is_array line as written in Patchset 9. -
Pierrick Caillon uploaded patch set 11 06/17/15, 15:27
-
Alexander Opitz commented on patch set 9 06/17/15, 16:09
GeneralUtility.php:914ReplyYes, but the space can also be added later. But I understand that the old $labels string have the space inside and we would need a trim_explode which would be more expensive. So Ok, let it as it is.GeneralUtility.php:942Replyabs($sizeInBytes) ? ;-) But NaN would be an expectable result for negative numbers. But, is ok. -
Alexander Opitz voted on patch set 11 V +1 CR +1 06/17/15, 16:10
-
Christian Kuhn voted on patch set 11 CR +2 V +2 06/17/15, 16:51
-
Christian Kuhn merged patch set 11 06/17/15, 16:51