diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index e833892d..73fa32d4 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1543,7 +1543,7 @@ class accountContainer { foreach ($attr_names as $i => $name) { // find deleted attributes if (isset($orig[$name]) && is_array($orig[$name])) { - foreach ($orig[$name] as $j => $value) { + foreach ($orig[$name] as $value) { if (is_array($attributes[$name])) { if (!in_array($value, $attributes[$name], true) && ($value !== null) @@ -1558,7 +1558,7 @@ class accountContainer { } // find new attributes if (isset($attributes[$name]) && is_array($attributes[$name])) { - foreach ($attributes[$name] as $j => $value) { + foreach ($attributes[$name] as $value) { if (isset($orig[$name]) && is_array($orig[$name])) { if (!in_array($value, $orig[$name], true) && ($value !== null) @@ -1572,7 +1572,7 @@ class accountContainer { } // find unchanged attributes if (isset($orig[$name]) && is_array($orig[$name]) && is_array($attributes[$name])) { - foreach ($attributes[$name] as $j => $value) { + foreach ($attributes[$name] as $value) { if (($value !== null) && ($value !== '') && in_array($value, $orig[$name], true)) { $notchanged[$name][] = $value; } diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index 3ed28827..67a1c420 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -432,17 +432,12 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I if (!empty($_POST['dns'])) { $_POST['dns'] = trim($_POST['dns']); $ex = explode(",", $_POST['dns']); - $dns = ""; $is_first=true; $invalid = false; foreach($ex AS $string) { if ($is_first) { - $dns .= $string; $is_first=false; } - else { - $dns .= ",$string"; - } if (!check_ip($string)) { $invalid = true; diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index cb5aaf09..968c3ea2 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -1657,7 +1657,6 @@ class inetOrgPerson extends baseModule implements passwordService { private function uploadPhoto() { $messages = array(); if ($_FILES['photoFile'] && ($_FILES['photoFile']['size'] > 0)) { - $name = $_FILES['photoFile']['name']; $handle = fopen($_FILES['photoFile']['tmp_name'], "r"); $data = fread($handle, 100000000); if (!empty($this->moduleSettings['inetOrgPerson_jpegPhoto_maxSize'][0]) && (strlen($data) > (1024 * $this->moduleSettings['inetOrgPerson_jpegPhoto_maxSize'][0]))) { diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index e3b8d31d..5ba714ce 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -5,7 +5,7 @@ use \LAM\PDF\PDFTableRow; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2018 Roland Gruber + Copyright (C) 2004 - 2020 Roland Gruber 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 @@ -668,7 +668,6 @@ class kolabUser extends baseModule { } uksort($delegates, 'compareDN'); $_SESSION['kolabUser_kolabDelegate'] = $kolabDelegate; - $delegateFields = array(); $delegateContainer = new htmlTable(); for ($i = 0; $i < sizeof($kolabDelegate); $i++) { $delegateContainer->addElement(new htmlOutputText($kolabDelegate[$i])); diff --git a/lam/lib/modules/pykotaBillingCode.inc b/lam/lib/modules/pykotaBillingCode.inc index 16d6d1c7..83da7bb1 100644 --- a/lam/lib/modules/pykotaBillingCode.inc +++ b/lam/lib/modules/pykotaBillingCode.inc @@ -2,7 +2,7 @@ /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2019 Roland Gruber + Copyright (C) 2013 - 2020 Roland Gruber 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 @@ -273,7 +273,7 @@ class pykotaBillingCode extends baseModule { if ($this->codeCache == null) { $this->loadCodeCache(); } - foreach ($this->codeCache as $dn => $bCode) { + foreach ($this->codeCache as $bCode) { if (!empty($bCode) && ($bCode == $code)) { return true; } diff --git a/lam/lib/modules/pykotaPrinter.inc b/lam/lib/modules/pykotaPrinter.inc index b37d026f..61c552d8 100644 --- a/lam/lib/modules/pykotaPrinter.inc +++ b/lam/lib/modules/pykotaPrinter.inc @@ -2,7 +2,7 @@ /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2019 Roland Gruber + Copyright (C) 2013 - 2020 Roland Gruber 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 @@ -620,7 +620,7 @@ class pykotaPrinter extends baseModule { if ($this->printerCache == null) { $this->loadPrinterNameCache(); } - foreach ($this->printerCache as $dn => $attrs) { + foreach ($this->printerCache as $attrs) { if (!empty($attrs['cn']) && ($attrs['cn'] == $cn)) { return true; } diff --git a/lam/lib/types/dhcp.inc b/lam/lib/types/dhcp.inc index 4b01ace2..25ab4fb3 100644 --- a/lam/lib/types/dhcp.inc +++ b/lam/lib/types/dhcp.inc @@ -3,7 +3,7 @@ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2009 - 2018 Roland Gruber + 2009 - 2020 Roland Gruber 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 @@ -189,7 +189,7 @@ class lamDHCPList extends lamList { $entries = searchLDAP($data['dn'], 'objectClass=dhcpHost', array('dhcpstatements', 'dhcphwaddress', 'cn')); if (sizeof($entries) > 0) { foreach ($entries as $entry) { - foreach ($entry as $attrName => $attrValues) { + foreach ($entry as $attrValues) { if (!is_array($attrValues)) { continue; } @@ -294,7 +294,7 @@ class lamDHCPList extends lamList { $table = new htmlTable(); $table->setCSSClasses(array('nowrap')); $ranges = array(); - foreach($entry['dhcprange'] AS $id => $value) { + foreach($entry['dhcprange'] AS $value) { if (!empty($value) && !is_numeric($value)) { $ex = explode(" ", $value); $row = new htmlTableRow( @@ -327,7 +327,7 @@ class lamDHCPList extends lamList { } } uksort($ranges, 'strnatcasecmp'); - foreach ($ranges as $text => $row) { + foreach ($ranges as $row) { $table->addElement($row); } return $table; diff --git a/lam/lib/upload.inc b/lam/lib/upload.inc index 585b529d..e743d9e8 100644 --- a/lam/lib/upload.inc +++ b/lam/lib/upload.inc @@ -3,7 +3,6 @@ namespace LAM\UPLOAD; use ZipArchive; use accountContainer; /* - $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2016 - 2020 Roland Gruber @@ -309,7 +308,6 @@ class Uploader { } } // load account - $typeManager = new \LAM\TYPES\TypeManager(); $_SESSION['mass_pdfAccount'] = new accountContainer($this->type, 'mass_pdfAccount'); $pdfErrors = $_SESSION['mass_pdfAccount']->load_account($dn, $infoAttributes); if (sizeof($pdfErrors) > 0) {