Skip to content

Commit 6967b76

Browse files
committed
Remove any confusing legacy sizing files; everything in the panel is true MB (1000) not MiB
1 parent 2d95204 commit 6967b76

File tree

4 files changed

+0
-107
lines changed

4 files changed

+0
-107
lines changed

app/Providers/MacroServiceProvider.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/helpers.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,4 @@
11
<?php
2-
/**
3-
* Pterodactyl - Panel
4-
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5-
*
6-
* This software is licensed under the terms of the MIT license.
7-
* https://opensource.org/licenses/MIT
8-
*/
9-
if (! function_exists('human_readable')) {
10-
/**
11-
* Generate a human-readable filesize for a given file path.
12-
*
13-
* @param string $path
14-
* @param int $precision
15-
* @return string
16-
*/
17-
function human_readable($path, $precision = 2)
18-
{
19-
if (is_numeric($path)) {
20-
$i = 0;
21-
while (($path / 1024) > 0.9) {
22-
$path = $path / 1024;
23-
$i++;
24-
}
25-
26-
return round($path, $precision) . ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'][$i];
27-
}
28-
29-
return app('file')->humanReadableSize($path, $precision);
30-
}
31-
}
322

333
if (! function_exists('is_digit')) {
344
/**

config/app.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@
180180
Pterodactyl\Providers\EventServiceProvider::class,
181181
Pterodactyl\Providers\HashidsServiceProvider::class,
182182
Pterodactyl\Providers\RouteServiceProvider::class,
183-
Pterodactyl\Providers\MacroServiceProvider::class,
184183
Pterodactyl\Providers\RepositoryServiceProvider::class,
185184
Pterodactyl\Providers\ViewComposerServiceProvider::class,
186185

tests/Unit/Helpers/HumanReadableTest.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)