Skip to content

Commit

Permalink
Fix deprecated call and hide pass in debug
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 22, 2019
1 parent 662afe8 commit e456cd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions htdocs/debugbar/class/DataCollector/DolConfigCollector.php
Expand Up @@ -77,6 +77,7 @@ protected function getConfig()
protected function objectToArray($obj)
{
// phpcs:enable
$arr=array();
$_arr = is_object($obj) ? get_object_vars($obj) : $obj;
foreach ($_arr as $key => $val) {
$val = (is_array($val) || is_object($val)) ? $this->objectToArray($val) : $val;
Expand Down
4 changes: 0 additions & 4 deletions htdocs/debugbar/class/DataCollector/DolQueryCollector.php
Expand Up @@ -44,9 +44,7 @@ public function collect()
$queries[] = array(
'sql' => $query['sql'],
'duration' => $query['duration'],
'duration_str' => $this->formatDuration($query['duration']),
'memory' => $query['memory_usage'],
'memory_str' => $this->formatBytes($query['memory_usage']),
'is_success' => $query['is_success'],
'error_code' => $query['error_code'],
'error_message' => $query['error_message']
Expand All @@ -62,9 +60,7 @@ public function collect()
'nb_statements' => count($queries),
'nb_failed_statements' => $totalFailed,
'accumulated_duration' => $totalExecTime,
'accumulated_duration_str' => $this->formatDuration($totalExecTime),
'memory_usage' => $totalMemoryUsage,
'memory_usage_str' => $this->formatBytes($totalMemoryUsage),
'statements' => $queries
);
}
Expand Down
6 changes: 3 additions & 3 deletions htdocs/debugbar/class/DataCollector/DolibarrCollector.php
Expand Up @@ -66,7 +66,7 @@ protected function getDolibarrInfo()
$info .= $langs->trans('Currency') . ': <strong>' . $conf->currency . '</strong><br>';
$info .= $langs->trans('DolEntity') . ': <strong>' . $conf->entity . '</strong><br>';
$info .= $langs->trans('ListLimit') . ': <strong>' . ($conf->liste_limit ?: $conf->global->MAIN_SIZE_LISTE_LIMIT) . '</strong><br>';
$info .= $langs->trans('UploadSize') . ': <strong>' . $conf->global->MAIN_UPLOAD_DOC . '</strong>';
$info .= $langs->trans('MaxSizeForUploadedFiles') . ': <strong>' . $conf->global->MAIN_UPLOAD_DOC . '</strong>';

return $info;
}
Expand All @@ -84,9 +84,9 @@ protected function getMailInfo()
$info .= $langs->trans('Server') . ': <strong>' . $conf->global->MAIN_MAIL_SMTP_SERVER . '</strong><br>';
$info .= $langs->trans('Port') . ': <strong>' . $conf->global->MAIN_MAIL_SMTP_PORT . '</strong><br>';
$info .= $langs->trans('ID') . ': <strong>' . $conf->global->MAIN_MAIL_SMTPS_ID . '</strong><br>';
$info .= $langs->trans('Pwd') . ': <strong>' . $conf->global->MAIN_MAIL_SMTPS_PW . '</strong><br>';
$info .= $langs->trans('Pwd') . ': <strong>' . preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW) . '</strong><br>';
$info .= $langs->trans('TLS/STARTTLS') . ': <strong>' . $conf->global->MAIN_MAIL_EMAIL_TLS . '</strong> / <strong>' . $conf->global->MAIN_MAIL_EMAIL_STARTTLS . '</strong><br>';
$info .= $langs->trans('Status') . ': <strong>' . ($conf->global->MAIN_DISABLE_ALL_MAILS ? $langs->trans('StatusDisabled') : $langs->trans('StatusEnabled')) . '</strong>';
$info .= $langs->trans('MAIN_DISABLE_ALL_MAILS') . ': <strong>' . ($conf->global->MAIN_DISABLE_ALL_MAILS ? $langs->trans('Yes') : $langs->trans('No')) . '</strong>';

return $info;
}
Expand Down

0 comments on commit e456cd2

Please sign in to comment.