From 338bf7e5c9f2fb11e4a1bd57b34b4337ca01016d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Wed, 11 Jan 2017 15:34:10 +0100
Subject: [PATCH] Sonar fixes

Conflicts:
	include/class_templateHandling.inc
	include/simpleplugin/class_simplePlugin.inc
---
 include/class_listing.inc                             | 6 +++---
 plugins/addons/dashboard/class_dashBoardPasswords.inc | 2 +-
 plugins/admin/groups/class_ogroup.inc                 | 1 -
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/include/class_listing.inc b/include/class_listing.inc
index 45e8e6175..0b752db39 100644
--- a/include/class_listing.inc
+++ b/include/class_listing.inc
@@ -967,13 +967,13 @@ class listing
    */
   function filterObjectType($row, $dn)
   {
-    return $this->filterGenericType($row, $dn, $this->objectTypes, $this->getObjectType($dn, $this->entries[$row]));
+    return $this->filterGenericType($dn, $this->objectTypes, $this->getObjectType($dn, $this->entries[$row]));
   }
 
   /*!
    * \brief Generic method for department and objects once type is known
    */
-  protected function filterGenericType($row, $dn, $types, $type)
+  protected function filterGenericType($dn, $types, $type)
   {
     $result = "&nbsp;";
 
@@ -997,7 +997,7 @@ class listing
    */
   function filterDepartmentType($row, $dn)
   {
-    return $this->filterGenericType($row, $dn, $this->departmentTypes, $this->getDepartmentType($dn, $this->departments[$row]));
+    return $this->filterGenericType($dn, $this->departmentTypes, $this->getDepartmentType($dn, $this->departments[$row]));
   }
 
   /*!
diff --git a/plugins/addons/dashboard/class_dashBoardPasswords.inc b/plugins/addons/dashboard/class_dashBoardPasswords.inc
index c498733a1..62bccae29 100644
--- a/plugins/addons/dashboard/class_dashBoardPasswords.inc
+++ b/plugins/addons/dashboard/class_dashBoardPasswords.inc
@@ -59,7 +59,7 @@ class dashboardPassword extends simplePlugin
     $nb_accounts = count($users);
     $nb_locked_accounts = 0;
     $methods_stats = array();
-    foreach ($users as $dn => $userPassword) {
+    foreach ($users as $userPassword) {
       if (!empty($userPassword)) {
         if (preg_match("/^\{[^\}]+\}!/", $userPassword)) {
           $nb_locked_accounts++;
diff --git a/plugins/admin/groups/class_ogroup.inc b/plugins/admin/groups/class_ogroup.inc
index 731b94c4f..b00805b09 100644
--- a/plugins/admin/groups/class_ogroup.inc
+++ b/plugins/admin/groups/class_ogroup.inc
@@ -235,7 +235,6 @@ class ogroup extends simplePlugin
 
   function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
   {
-    global $config;
     parent::__construct($dn, $object, $parent, $mainTab);
 
     $this->attributesAccess['trustMode']->setInLdap(FALSE);
-- 
GitLab