Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d77cf058
Commit
d77cf058
authored
May 20, 2005
by
Dries
Browse files
- Patch
#23211
by Neil: better formatting of sizes in format_size().
parent
235a39e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
d77cf058
...
...
@@ -806,11 +806,11 @@ function format_plural($count, $singular, $plural) {
*/
function
format_size
(
$size
)
{
$suffix
=
t
(
'bytes'
);
if
(
$size
>
1024
)
{
if
(
$size
>
=
1024
)
{
$size
=
round
(
$size
/
1024
,
2
);
$suffix
=
t
(
'KB'
);
}
if
(
$size
>
1024
)
{
if
(
$size
>
=
1024
)
{
$size
=
round
(
$size
/
1024
,
2
);
$suffix
=
t
(
'MB'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment