trans('Host') . ': ' . $conf->db->host . '
'; $info .= $langs->trans('Port') . ': ' . $conf->db->port . '
'; $info .= $langs->trans('Name') . ': ' . $conf->db->name . '
'; $info .= $langs->trans('User') . ': ' . $conf->db->user . '
'; $info .= $langs->trans('Type') . ': ' . $conf->db->type . '
'; $info .= $langs->trans('Prefix') . ': ' . $conf->db->prefix . '
'; $info .= $langs->trans('Charset') . ': ' . $conf->db->character_set . ''; return $info; } /** * Return dolibarr info as an HTML string * * @return string HTML string */ protected function getDolibarrInfo() { global $conf, $langs; $info = $langs->trans('Version') . ': ' . DOL_VERSION . '
'; $info .= $langs->trans('Theme') . ': ' . $conf->theme . '
'; $info .= $langs->trans('Locale') . ': ' . $conf->global->MAIN_LANG_DEFAULT . '
'; $info .= $langs->trans('Currency') . ': ' . $conf->currency . '
'; $info .= $langs->trans('DolEntity') . ': ' . $conf->entity . '
'; $info .= $langs->trans('ListLimit') . ': ' . ($conf->liste_limit ?: $conf->global->MAIN_SIZE_LISTE_LIMIT) . '
'; $info .= $langs->trans('MaxSizeForUploadedFiles') . ': ' . $conf->global->MAIN_UPLOAD_DOC . ''; return $info; } /** * Return mail info as an HTML string * * @return string HTML string */ protected function getMailInfo() { global $conf, $langs; $info = $langs->trans('Method') . ': ' . $conf->global->MAIN_MAIL_SENDMODE . '
'; $info .= $langs->trans('Server') . ': ' . $conf->global->MAIN_MAIL_SMTP_SERVER . '
'; $info .= $langs->trans('Port') . ': ' . $conf->global->MAIN_MAIL_SMTP_PORT . '
'; $info .= $langs->trans('ID') . ': ' . $conf->global->MAIN_MAIL_SMTPS_ID . '
'; $info .= $langs->trans('Pwd') . ': ' . preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW) . '
'; $info .= $langs->trans('TLS/STARTTLS') . ': ' . $conf->global->MAIN_MAIL_EMAIL_TLS . ' / ' . $conf->global->MAIN_MAIL_EMAIL_STARTTLS . '
'; $info .= $langs->trans('MAIN_DISABLE_ALL_MAILS') . ': ' . ($conf->global->MAIN_DISABLE_ALL_MAILS ? $langs->trans('Yes') : $langs->trans('No')) . ''; return $info; } /** * Return widget settings * * @return array Array */ public function getWidgets() { return array( "database_info" => array( "icon" => "database", "indicator" => "PhpDebugBar.DebugBar.TooltipIndicator", "tooltip" => array( "html" => $this->getDatabaseInfo(), "class" => "tooltip-wide" ), "map" => "", "default" => "" ), "dolibarr_info" => array( "icon" => "desktop", "indicator" => "PhpDebugBar.DebugBar.TooltipIndicator", "tooltip" => array( "html" => $this->getDolibarrInfo(), "class" => "tooltip-wide" ), "map" => "", "default" => "" ), "mail_info" => array( "icon" => "envelope", "indicator" => "PhpDebugBar.DebugBar.TooltipIndicator", "tooltip" => array( "html" => $this->getMailInfo(), "class" => "tooltip-extra-wide" ), "map" => "", "default" => "" ) ); } /** * Return collector assests * * @return array Array */ public function getAssets() { return array( 'base_url' => dol_buildpath('/debugbar', 1), 'js' => 'js/widgets.js' ); } }