View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004639 | MMW v4 | Framework: Scripts/Extensions | public | 2008-05-05 13:25 | 2009-02-20 00:18 |
Reporter | jiri | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.0 | ||||
Fixed in Version | 3.1 | ||||
Summary | 0004639: Stats script: Improve file size reporting | ||||
Description | A user (Rik - Richard Lewis [richardpaullewis@gmail.com]) reported that the rounding in our Statistics script could be slightly improved. He even included a modified routine: Function FormatFileSize(intFileLength) Dim strSize : strSize = Translate("Bytes") If intFileLength >= 1024 Then intFileLength = intFileLength / 1024 strSize = Translate("Kb") End If If intFileLength >= 1024 Then intFileLength = intFileLength / 1024 strSize = Translate("Mb") End If If intFileLength >= 1024 Then intFileLength = intFileLength / 1024 strSize = Translate("Gb") End If If intFileLength >= 1024 Then intFileLength = intFileLength / 1024 strSize = Translate("Tb") End If If intFileLength < 10 Then FormatFileSize = FormatNumber(intFileLength,2)&strSize Else If intFileLength < 100 Then FormatFileSize = FormatNumber(intFileLength,1)&strSize Else FormatFileSize = FormatNumber(intFileLength,0)&strSize End If End If End Function | ||||
Tags | No tags attached. | ||||
Fixed in build | 1185 | ||||