Skip to content

Commit 3688b85

Browse files
committed
fix(manager): niceSize() for backup manager
1 parent 75492f7 commit 3688b85

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

core/functions/helper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ function niceCount(int|float $count, int $precision = 1): string
215215
*
216216
* @param float $seconds Number of seconds to format
217217
* @return string Human-readable time format
218+
* @since 3.5.0
218219
*
219220
* @example
220221
* niceEta(45.5); // "46s"
@@ -282,6 +283,7 @@ function niceEta(float $seconds): string
282283
*
283284
* @param int|float $size File size in bytes
284285
* @return string Formatted file size with unit
286+
* @since 3.5.0
285287
*
286288
* @example
287289
* niceSize(1024); // "1 KB"

manager/actions/bkmanager.static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class="form-check-input"
359359
echo '<td class="text-xs-right">' . ($db_status['Data_free'] > 0 ? niceSize($db_status['Data_free']) : '-') . '</td>' . "\n";
360360
}
361361

362-
echo '<td class="text-xs-right">' . niceSize($db_status['Data_length'] - $db_status['Data_free']) . '</td>' . "\n" . '<td class="text-xs-right">' . niceSize($db_status['Index_length']) . '</td>' . "\n" . '<td class="text-xs-right">' . EvolutionCMS()->nicesize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n" . "</tr>";
362+
echo '<td class="text-xs-right">' . niceSize($db_status['Data_length'] - $db_status['Data_free']) . '</td>' . "\n" . '<td class="text-xs-right">' . niceSize($db_status['Index_length']) . '</td>' . "\n" . '<td class="text-xs-right">' . niceSize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n" . "</tr>";
363363

364364
$total += $db_status['Index_length'] + $db_status['Data_length'];
365365
$totaloverhead += $db_status['Data_free'];

0 commit comments

Comments
 (0)