From 46e21a0b2d3af29af3039e0f32c30a1c73c01581 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Apr 2024 03:50:46 +0200 Subject: [PATCH] Removed dead code --- .../DataCollector/DolMessagesCollector.php | 57 ------------------- htdocs/debugbar/class/DebugBar.php | 3 - htdocs/debugbar/js/widgets.js | 1 - 3 files changed, 61 deletions(-) delete mode 100644 htdocs/debugbar/class/DataCollector/DolMessagesCollector.php diff --git a/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php b/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php deleted file mode 100644 index 3c605687b95..00000000000 --- a/htdocs/debugbar/class/DataCollector/DolMessagesCollector.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/debugbar/class/DataCollector/DolMessagesCollector.php - * \brief Class for debugbar collection - * \ingroup debugbar - */ - -use DebugBar\DataCollector\MessagesCollector; - -/** - * DolMessagesCollector class - */ - -class DolMessagesCollector extends MessagesCollector -{ - /** - * Return widget settings - * - * @return array Array - */ - public function getWidgets() - { - global $langs; - - $title = $langs->transnoentities('Messages'); - $name = $this->getName(); - - return array( - "$title" => array( - "icon" => "list-alt", - "widget" => "PhpDebugBar.Widgets.MessagesWidget", - "map" => "$name.messages", - "default" => "[]" - ), - "$title:badge" => array( - "map" => "$name.count", - "default" => "null" - ) - ); - } -} diff --git a/htdocs/debugbar/class/DebugBar.php b/htdocs/debugbar/class/DebugBar.php index 9ad79d382e0..8ce3eb1573f 100644 --- a/htdocs/debugbar/class/DebugBar.php +++ b/htdocs/debugbar/class/DebugBar.php @@ -25,7 +25,6 @@ dol_include_once('/debugbar/class/autoloader.php'); use DebugBar\DebugBar; -dol_include_once('/debugbar/class/DataCollector/DolMessagesCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolRequestDataCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolConfigCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolTimeDataCollector.php'); @@ -51,8 +50,6 @@ class DolibarrDebugBar extends DebugBar */ public function __construct() { - global $conf; - //$this->addCollector(new PhpInfoCollector()); //$this->addCollector(new DolMessagesCollector()); $this->addCollector(new DolRequestDataCollector()); diff --git a/htdocs/debugbar/js/widgets.js b/htdocs/debugbar/js/widgets.js index 2b39fab9943..e8da2ae892a 100644 --- a/htdocs/debugbar/js/widgets.js +++ b/htdocs/debugbar/js/widgets.js @@ -80,7 +80,6 @@ * - data */ var HookListWidget = PhpDebugBar.Widgets.HookListWidget = PhpDebugBar.Widgets.KVListWidget.extend({ - className: csscls('widgets-kvlist widgets-hooklist'), itemRenderer: function(dt, dd, key, object) {