Korrekturen
URLs angepasst Statistik Einheit automatisch ändern (MB -> GB)
This commit is contained in:
@@ -282,6 +282,17 @@ class StatisticBuilder
|
||||
$this->suffix = isset($suffix) ? $suffix : NULL;
|
||||
$this->label = _t($statistic['label']);
|
||||
$this->unit = $statistic['unit'];
|
||||
if ($statistic['unit'] == 'MB') {
|
||||
$log = new LogStatistic();
|
||||
$log->setFile(LOG_PATH . $this->raw . '.csv');
|
||||
$lastValue = $log->getLast();
|
||||
$log->close();
|
||||
|
||||
if ($lastValue && $lastValue[1] > 999999999) {
|
||||
$this->unit = 'GB';
|
||||
$this->label = 'GB';
|
||||
}
|
||||
}
|
||||
$this->cycle = $statistic['cycle'];
|
||||
$this->limits = $statistic['limits'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user