View Issue Details

IDProjectCategoryView StatusLast Update
0004639MMW v4Framework: Scripts/Extensionspublic2009-02-20 00:18
Reporterjiri Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.1 
Summary0004639: Stats script: Improve file size reporting
DescriptionA 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
TagsNo tags attached.
Fixed in build1185

Activities

jiri

2008-05-05 13:25

administrator   ~0013872

We should include this in MM 3.1.

Ludek

2008-07-08 21:55

developer   ~0014332

Fixed in build 1185.

stephen_platt

2009-02-20 00:18

developer   ~0016762

verified 1223