diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index da4d3da8..ceb85251 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -789,7 +789,8 @@ class asteriskAccount extends baseModule implements passwordService { $errors[] = $this->messages['AstAccountCallerID'][1]; } // check for duplicate caller ID - else if (!isset($this->orig['AstAccountCallerID'][0]) || (($this->orig['AstAccountCallerID'][0] != $this->attributes['AstAccountCallerID'][0]))) { + else if (!isset($this->orig['AstAccountCallerID'][0]) + || ($this->orig['AstAccountCallerID'][0] != $this->attributes['AstAccountCallerID'][0])) { $entries = searchLDAPByAttribute('AstAccountCallerID', $this->attributes['AstAccountCallerID'][0], 'AsteriskSIPUser', array('dn'), array('user')); if (sizeof($entries) > 0) { $errors[] = $this->messages['AstAccountCallerID'][2]; diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index bf39585b..f34c60c7 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -3918,7 +3918,6 @@ class inetOrgPerson extends baseModule implements passwordService { _('Photo') => 'inetOrgPerson_readOnly_jpegPhoto', _('Password') => 'inetOrgPerson_readOnly_userPassword' ); if (isset($_SESSION['conf_config'])) { - $confActiveUnixUserModules = $_SESSION['conf_config']->get_AccountModules('user'); $readOnlyOptions[_('User name')] = 'inetOrgPerson_readOnly_uid'; $readOnlyOptions[_('Common name')] = 'inetOrgPerson_readOnly_cn'; } diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 947382b3..692a9c72 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -3507,20 +3507,6 @@ class posixAccount extends baseModule implements passwordService { return null; } - /** - * Returns the group DN of the given group. - * - * @param String $groupname group name - * @return String DN - */ - private function getGroupDN($groupname) { - $results = searchLDAPByAttribute('cn', $groupname, 'posixGroup', array('dn'), array('group')); - if ((sizeof($results) > 0) && isset($results[0]['dn'][0])) { - return $results[0]['dn']; - } - return null; - } - /** * Finds all existing LDAP groups. * diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index 86feac5a..da04b235 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -5,7 +5,7 @@ use LAM\ImageUtils\ImageManipulationFactory; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2004 Michael Duergner - 2003 - 2018 Roland Gruber + 2003 - 2019 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 @@ -58,7 +58,7 @@ include_once('pdfstruct.inc'); * @param $returnAsString returns the PDF output as String value instead of writing it to a file * @return String PDF file name */ -function createModulePDF($accounts, $pdf_structure="default", $font, $returnAsString = false) { +function createModulePDF($accounts, $pdf_structure, $font, $returnAsString = false) { $account_type = $accounts[0]->get_type(); // Get PDF structure from xml file $reader = new PDFStructureReader(); diff --git a/lam/style/responsive/110_grid.css b/lam/style/responsive/110_grid.css index a96302b5..6afcebf2 100644 --- a/lam/style/responsive/110_grid.css +++ b/lam/style/responsive/110_grid.css @@ -1,7 +1,7 @@ /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2018 Roland Gruber + Copyright (C) 2018 - 2019 Roland Gruber Based on Foundation Grid: https://foundation.zurb.com/sites/docs/v/5.5.3/components/grid.html License: MIT License @@ -20,7 +20,10 @@ html, body { box-sizing: border-box; } -html, +html { + font-size: 100%; +} + body { font-size: 100%; } diff --git a/lam/templates/lib/500_lam.js b/lam/templates/lib/500_lam.js index febcaabc..81772268 100644 --- a/lam/templates/lib/500_lam.js +++ b/lam/templates/lib/500_lam.js @@ -276,7 +276,7 @@ function passwordHandleInput(random, ajaxURL, tokenName, tokenValue) { var data = {jsonInput: pwdJSON}; data[tokenName] = tokenValue; // make AJAX call - jQuery.post(ajaxURL, data, function(data) {passwordHandleReply(data);}, 'json'); + jQuery.post(ajaxURL, data, function(dataReturned) {passwordHandleReply(dataReturned);}, 'json'); } /** @@ -554,7 +554,7 @@ function checkPasswordStrength(fieldID, ajaxURL, tokenName, tokenValue) { var data = {jsonInput: pwdJSON}; data[tokenName] = tokenValue; // make AJAX call - jQuery.post(ajaxURL + "&function=passwordStrengthCheck", data, function(data) {checkPasswordStrengthHandleReply(data, fieldID);}, 'json'); + jQuery.post(ajaxURL + "&function=passwordStrengthCheck", data, function(dataReturned) {checkPasswordStrengthHandleReply(dataReturned, fieldID);}, 'json'); }; jQuery(field).keyup(check); } diff --git a/lam/templates/profedit/profilemain.php b/lam/templates/profedit/profilemain.php index fd228e69..7fe95e64 100644 --- a/lam/templates/profedit/profilemain.php +++ b/lam/templates/profedit/profilemain.php @@ -19,7 +19,7 @@ use \LAM\TYPES\TypeManager; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2018 Roland Gruber + Copyright (C) 2003 - 2019 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 @@ -277,7 +277,7 @@ foreach ($profileClasses as $profileClass) { echo "
\n"; echo "
\n"; - $containerProfiles = new htmlResponsiveRow();; + $containerProfiles = new htmlResponsiveRow(); $containerProfiles->add(new htmlOutputText(_('Profiles')), 12); $select = new htmlSelect('importProfiles', $importOptions, array(), count($importOptions, 1) < 15 ? count($importOptions, 1) : 15); diff --git a/lam/templates/tools/multiEdit.php b/lam/templates/tools/multiEdit.php index 21efe438..7701e8be 100644 --- a/lam/templates/tools/multiEdit.php +++ b/lam/templates/tools/multiEdit.php @@ -22,7 +22,7 @@ use \htmlResponsiveTable; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2018 Roland Gruber + Copyright (C) 2013 - 2019 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 @@ -61,7 +61,9 @@ startSecureSession(); enforceUserIsLoggedIn(); // die if no write access -if (!checkIfWriteAccessIsAllowed()) die(); +if (!checkIfWriteAccessIsAllowed()) { + die(); +} checkIfToolIsActive('toolMultiEdit'); @@ -499,12 +501,10 @@ function multiEditLdapErrorHandler($errno, $errstr, $errfile, $errline) { case E_USER_ERROR: logNewMessage(LOG_ERR, 'Error occured: ' . $errstr . " ($errfile: $errline)"); $_REQUEST['multiEdit_error'] = true; - ; break; case E_USER_WARNING: logNewMessage(LOG_WARNING, 'Error occured: ' . $errstr . " ($errfile: $errline)"); $_REQUEST['multiEdit_error'] = true; - ; break; } } diff --git a/sonar-project.properties b/sonar-project.properties index d72c0d73..7bcd7ef1 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -18,4 +18,4 @@ sonar.tests=lam/tests sonar.php.tests.reportPath=code-coverage/junit.xml sonar.php.coverage.reportPaths=code-coverage/clover.xml -sonar.exclusions=**/3rdParty/**,**/lib/extra/**,**/lib/*jquery*.js,**/tests/**,**/style/*jquery*.css,,**/style/*cropper*.css,**/style/*magnific*.css,**/schema.inc +sonar.exclusions=**/3rdParty/**,**/lib/extra/**,**/lib/*jquery*.js,**/tests/**,**/style/*jquery*.css,,**/style/*cropper*.css,**/style/*magnific*.css,**/style/responsive/*normalize*.css,**/schema.inc