[TYPO3-core] RFC #13645: Bug and Cleanup: t3lib_div::formatSize should use IEC prefixes and appropriate units

Sigfried Arnold s.arnold at rebell.at
Tue Mar 9 09:13:49 CET 2010


Hello Xavier

> Great, everybody will be happy!

Finaly ;)

> You are trying to patch core, everything that is not done now is likely
> to stay as this for a longer time than initially expected. Please
> provide a change to config_default.php too.

Sure i will provide a patch for that too, but frist the new function 
should be tested and approved before i do the other work. Maybe someone 
has another/better idea to configure the defaults.

Another option would be 2 configuraton variables: one for the base and 
one for the units. But i decided to do that one, because its easier to 
configure by just one single switch.

After that steps are done, i'll deliver a combined patch with all 
necessary changes.

> - CGL is not applied. A few points:
> - method signature misses spaces (here with °) .
> "formatSize($sizeInBytes,°$labels°=°'')

Well that was there before ;) i did not noticed that, will be fixed.

> - default suffix array always has a space after "giga" and separator to
> "tera", whereas other have separator next to them without space. why?

My bad, will be fixed.

> (apply to method signature too)

Did not get that one, please explain.

> - many many one line statement (with curly bracket I agree but still) =>
> refactor to multiple lines

Will be done. I you mean primarily the last 3 lines - or should i split 
the configuration array too (though it's better readable this way)

> - Comments traditionally start with an upper case letter

Will be fixed.

> - last 3 lines are "hard" to undertand, using comment on separate line
> and proper CGL would enhance it

More explaination will be added.



More information about the TYPO3-team-core mailing list