Commit 0f9b5eb0 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Sonar fixes

parent 368a4572
......@@ -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 = " ";
......@@ -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]));
}
/*!
......
......@@ -127,7 +127,6 @@ class management
*/
function execute()
{
global $config;
// Ensure that html posts and gets are kept even if we see a 'Entry islocked' dialog.
$vars = array('/^act$/','/^listing/','/^PID$/','/^FILTER_PID$/');
session::set('LOCK_VARS_TO_USE', $vars);
......
......@@ -111,7 +111,7 @@ class templateHandling
*/
public static function checkFields ($attrs)
{
list($depends, $errors) = static::attributesDependencies($attrs);
list(, $errors) = static::attributesDependencies($attrs);
return $errors;
}
......
......@@ -757,8 +757,6 @@ function del_user_locks($userdn)
*/
function get_lock($object)
{
global $config;
/* Sanity check */
if ($object == '') {
msg_dialog::display(_('Internal error'), _('Error while adding a lock. Contact the developers!'), ERROR_DIALOG);
......
......@@ -1137,15 +1137,12 @@ class simplePlugin extends plugin
switch ($mode) {
case 'add':
return $this->callHook($when.'CREATE', $addAttrs);
break;
case 'modify':
return $this->callHook($when.'MODIFY', $addAttrs);
break;
case 'remove':
return $this->callHook($when.'REMOVE', $addAttrs);
break;
default:
trigger_error(sprintf('Invalid %s event type given: "%s"! Valid types are: add, modify, remove.', strtolower($when), $mode));
......
......@@ -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++;
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment