diff --git a/lam/HISTORY b/lam/HISTORY index 2c85455a..aa10c166 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -821,7 +821,7 @@ March 2020 7.1 - security: LAM checks the session id and client IP - fixed bugs: -> Samba 3: hash values were wrong in some rare cases (1440021) - -> Samba 3: readded time zone selection for logon hours (1407761) + -> Samba 3: re-added time zone selection for logon hours (1407761) -> Unix: call of unknown function (1450464) diff --git a/lam/codespell.sh b/lam/codespell.sh new file mode 100755 index 00000000..75bc207a --- /dev/null +++ b/lam/codespell.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +~/.local/bin/codespell --skip '*3rdParty*,*/ckeditor/*,*/po/*,*/locale/*,tmp,sess,config,graphics,*/style/images/*,*/style/*.gif,*/style/*.png,*/docs/manual-onePage/*,*/docs/manual-sources/images/*,*/templates/lib/*jquery*,*~,*/docs/phpdoc/*,*/docs/manual/*,*/docs/devel/images/*,*/docs/manual-pdf/*,*.sh' --ignore-words-list 'tim' diff --git a/lam/lib/account.inc b/lam/lib/account.inc index f9e49692..90f86732 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1346,7 +1346,7 @@ function encodeMailAddress($address) { } /** - * Returns a base64 encoded string of the given values in a fomat that is used in emails. + * Returns a base64 encoded string of the given values in a format that is used in emails. * * @param String $value value to encode * @return String base64 encoded value diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 5ca2ff12..e25f0b9b 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -7,7 +7,7 @@ use LAM\PDF\PDFImage; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2018 Roland Gruber + Copyright (C) 2003 - 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 @@ -880,7 +880,7 @@ abstract class baseModule { * * Calling this method does not require the existence of an enclosing {@link accountContainer}.
*
- * This funtion returns an array which contains subarrays which represent an upload column. + * This function returns an array which contains subarrays which represent an upload column. * Syntax of column arrays: *
*
array( diff --git a/lam/lib/config.inc b/lam/lib/config.inc index a7d5c64f..cba83e0a 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -264,7 +264,7 @@ function deleteConfigProfile($name) { /** * Returns the version number of this LAM installation. * Format: .. -*
Major/minor version are always numbers, patch level may contain letters for inofficial releases only (e.g. 0.5.alpha1). +*
Major/minor version are always numbers, patch level may contain letters for unofficial releases only (e.g. 0.5.alpha1). * * @return string version number */ diff --git a/lam/lib/createntlm.inc b/lam/lib/createntlm.inc index 871e9a4e..88e2a7ff 100644 --- a/lam/lib/createntlm.inc +++ b/lam/lib/createntlm.inc @@ -40,7 +40,7 @@ $Id$ */ class smbHash { -# Contants used in lanlam hash calculations +# Constants used in lanlam hash calculations # Ported from SAMBA/source/libsmb/smbdes.c:perm1[56] private $perm1 = array(57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, diff --git a/lam/lib/html.inc b/lam/lib/html.inc index 31f0bf0f..7b077aaf 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -782,7 +782,7 @@ class htmlInputField extends htmlElement { * Enables autocompletion for this input field. * * @param array $values list of values to suggest - * @param int $minLength autocompletion starts after this number of caracters entered (default 1; 0 means immediate start) + * @param int $minLength autocompletion starts after this number of characters entered (default 1; 0 means immediate start) * @param boolean $multiValue allow multiple autocompletion values in the same fields (default: false) * @param String $multiSeparator separator expression if multiple autocompletion values are allowed (default ",\s*") * @param String $multiSeparator separator for two values (default ", ") @@ -1424,7 +1424,7 @@ class htmlSelect extends htmlElement { } /** - * Specifies if the elemets should be sorted (default: sort). + * Specifies if the elements should be sorted (default: sort). * * @param boolean $sortElements sort elements */ @@ -3465,7 +3465,7 @@ class htmlContentLink extends htmlLink { * * @param htmlElement $content content to link * @param String $target link target - * @param boolean $highlightOnHover higlight content on hover + * @param boolean $highlightOnHover highlight content on hover */ function __construct($content, $target) { $this->content = $content; diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index df40558f..e833892d 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -4,7 +4,7 @@ use \LAM\TYPES\TypeManager; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2019 Roland Gruber + Copyright (C) 2003 - 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 @@ -223,7 +223,7 @@ function getModulesDependencies($scope) { * * @param array $selected selected module names * @param array $deps module dependencies -* @return mixed false if no misssing dependency was found, +* @return mixed false if no missing dependency was found, * otherwise an array of array(selected module, depending module) if missing dependencies were found */ function check_module_depends($selected, $deps) { @@ -850,7 +850,7 @@ class accountContainer { } /** - * Returns the accout type of this object (e.g. user, group, host). + * Returns the account type of this object (e.g. user, group, host). * * @return ConfiguredType account type */ @@ -1211,7 +1211,7 @@ class accountContainer { $return['messages'] .= StatusMessage('ERROR', _('Passwords are different!'), '', array(), true); $return['errorsOccured'] = 'true'; } - // check passsword stregth + // check passsword strength $pwdPolicyResult = checkPasswordStrength($password1, null, null); if ($pwdPolicyResult !== true) { $return['messages'] .= StatusMessage('ERROR', $pwdPolicyResult, '', array(), true); diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 5580b387..570f7ec6 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -1086,7 +1086,7 @@ class posixAccount extends baseModule implements passwordService { } } $this->attributes['uid'][0] = trim($_POST['uid']); - // Check if UID is valid. If none value was entered, the next useable value will be inserted + // Check if UID is valid. If none value was entered, the next usable value will be inserted // load min and may uidNumber if ($this->get_scope()=='user') { $minID = intval($this->moduleSettings['posixAccount_' . $typeId . '_minUID'][0]); diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 3b1d5f37..5ea2a135 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -6,7 +6,7 @@ use LAM\TYPES\ConfiguredType; This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2007 - 2019 Roland Gruber + 2007 - 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 @@ -822,7 +822,7 @@ class posixGroup extends baseModule implements passwordService { if (isset($_POST['changegids'])) $this->changegids=true; else $this->changegids=false; if (!isset($this->attributes['gidNumber'][0]) || ($this->attributes['gidNumber'][0] != $_POST['gidNumber'])) { - // Check if GID is valid. If none value was entered, the next useable value will be inserted + // Check if GID is valid. If none value was entered, the next usable value will be inserted // load min and max GID number $minID = intval($this->moduleSettings['posixGroup_' . $typeId . '_minGID'][0]); $maxID = intval($this->moduleSettings['posixGroup_' . $typeId . '_maxGID'][0]); diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index 23bdb271..de2120d2 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -107,7 +107,7 @@ function createPdf($structure, $accounts, $pdfKeys, $account_type, $font, $retur // Get PDF entries for the current account $entries = $account->get_pdfEntries($pdfKeys, $account_type->getId()); - // Now create the PDF file acording to the structure with the submitted values + // Now create the PDF file according to the structure with the submitted values foreach ($structure->getSections() as $section) { if ($section instanceof PDFTextSection) { $pdf->setFont($font, "", LAMPDF_FONT_SIZE); diff --git a/lam/lib/schema.inc b/lam/lib/schema.inc index 2f31b167..a7106a02 100644 --- a/lam/lib/schema.inc +++ b/lam/lib/schema.inc @@ -1354,7 +1354,7 @@ function _get_schema_dn($dn, $debug=false ) function _get_raw_schema($schema_to_fetch, $dn='' ) { - // Swith to true to enable verbose output of schema fetching progress + // Switch to true to enable verbose output of schema fetching progress $debug = false; $ds = $_SESSION['ldap']->server(); diff --git a/lam/lib/security.inc b/lam/lib/security.inc index 28663c85..d563d0d4 100644 --- a/lam/lib/security.inc +++ b/lam/lib/security.inc @@ -2,7 +2,7 @@ /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2006 - 2019 Roland Gruber + Copyright (C) 2006 - 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 @@ -53,7 +53,7 @@ function lam_start_session() { /** * Starts a session and checks the environment. - * The script is stopped if one of the checks fail (timeout redirection may be overriden). + * The script is stopped if one of the checks fail (timeout redirection may be overridden). * * @param boolean $redirectToLogin redirect user to login page (default: true) * @param boolean $initSecureData init verification data like session ID and client IP (default: false) diff --git a/lam/lib/tools.inc b/lam/lib/tools.inc index 29d5e76e..578b50a9 100644 --- a/lam/lib/tools.inc +++ b/lam/lib/tools.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2009 - 2011 Roland Gruber + Copyright (C) 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 @@ -58,7 +58,7 @@ function getTools() { /** * Represents a tool. - * LAM will scan lib/tools/*.inc for classes which implement this interface. This alows to + * LAM will scan lib/tools/*.inc for classes which implement this interface. This allows to * dynamically plugin additional tools. There will be an entry on the tools page inside LAM * for each found class (if it matches the security level). * A LAMTool only specifies name, description and location of a tool. The tool functionality diff --git a/lam/lib/upload.inc b/lam/lib/upload.inc index 1804c067..585b529d 100644 --- a/lam/lib/upload.inc +++ b/lam/lib/upload.inc @@ -6,7 +6,7 @@ use accountContainer; $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2016 - 2018 Roland Gruber + Copyright (C) 2016 - 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 @@ -153,7 +153,7 @@ class Uploader { if (!$success) { $errorMessage = array( "ERROR", - _("LAM was unable to create account %s! An LDAP error occured."), + _("LAM was unable to create account %s! An LDAP error occurred."), getDefaultLDAPErrorString($_SESSION['ldap']->server()), array($position)); $_SESSION['mass_errors'][] = $errorMessage; diff --git a/lam/templates/upload/masscreate.php b/lam/templates/upload/masscreate.php index 785f9c7f..95c4196d 100644 --- a/lam/templates/upload/masscreate.php +++ b/lam/templates/upload/masscreate.php @@ -21,7 +21,7 @@ use \moduleCache; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2019 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 @@ -251,7 +251,7 @@ echo ''; include __DIR__ . '/../../lib/adminFooter.inc'; /** -* Displays the acount type specific main page of the upload. +* Displays the account type specific main page of the upload. * * @param \LAM\TYPES\ConfiguredType $type account type * @param array $selectedModules list of selected account modules