Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Diagnostics/Diagnostic/DbMaxPacket.php')
-rw-r--r--plugins/Diagnostics/Diagnostic/DbMaxPacket.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Diagnostics/Diagnostic/DbMaxPacket.php b/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
index a771ba564d..65d2d5bcce 100644
--- a/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
+++ b/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
@@ -3,10 +3,10 @@
namespace Piwik\Plugins\Diagnostics\Diagnostic;
use Piwik\Db;
-use Piwik\MetricsFormatter;
use Piwik\Piwik;
use Piwik\SettingsPiwik;
use Piwik\Translation\Translator;
+use Piwik\Metrics\Formatter;
/**
* Check if Piwik is connected with database through ssl.
@@ -40,7 +40,8 @@ class DbMaxPacket implements Diagnostic
$minSize = self::MIN_VALUE_MAX_PACKET_MB * 1000 * 1000; // not using 1024 just in case... this amount be good enough
if (!empty($maxPacketBytes['Value']) && $maxPacketBytes['Value'] < $minSize) {
$status = DiagnosticResult::STATUS_WARNING;
- $pretty = MetricsFormatter::getPrettySizeFromBytes($maxPacketBytes['Value'], 'M');
+ $formatter = new Formatter\Html();
+ $pretty = $formatter->getPrettySizeFromBytes($maxPacketBytes['Value'], 'M', $precision = 1);
$configured = str_replace(array(' M', '&nbsp;M'), 'MB', $pretty);
$comment = Piwik::translate('Diagnostics_MysqlMaxPacketSizeWarning', array('64MB', $configured));
}