From 1607bd8ee596962f14f429ac4ec5efea19ac02cb Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 15 Jul 2012 12:05:47 +0000 Subject: [PATCH] PHPDoc update --- lam/lib/account.inc | 6 ++++++ lam/lib/baseModule.inc | 3 +-- lam/lib/baseType.inc | 2 ++ lam/lib/config.inc | 1 + lam/lib/html.inc | 9 +++++++++ lam/lib/lamPDF.inc | 10 +++++----- lam/lib/ldap.inc | 3 +++ lam/lib/lists.inc | 10 +++++++++- lam/lib/modules/account.inc | 2 +- lam/lib/modules/asteriskAccount.inc | 2 +- lam/lib/modules/asteriskExtension.inc | 18 ++++++++++++++---- lam/lib/modules/asteriskVoicemail.inc | 2 +- lam/lib/modules/authorizedServiceObject.inc | 2 +- lam/lib/modules/ddns.inc | 12 ++++++------ lam/lib/modules/dhcp_settings.inc | 17 ++++++++++++----- lam/lib/modules/eduPerson.inc | 3 ++- lam/lib/modules/fixed_ip.inc | 13 +++++++------ lam/lib/modules/freeRadius.inc | 3 ++- lam/lib/modules/hostObject.inc | 2 +- lam/lib/modules/ieee802device.inc | 2 +- lam/lib/modules/imapAccess.inc | 3 +++ lam/lib/modules/inetLocalMailRecipient.inc | 2 +- lam/lib/modules/inetOrgPerson.inc | 3 ++- lam/lib/modules/kolabUser.inc | 2 +- lam/lib/modules/ldapPublicKey.inc | 2 +- lam/lib/modules/nisMailAlias.inc | 2 +- lam/lib/modules/nisnetgroup.inc | 5 ++++- lam/lib/modules/posixAccount.inc | 14 ++++++++++++-- lam/lib/modules/posixGroup.inc | 8 ++++++-- lam/lib/modules/quota.inc | 7 +++++-- lam/lib/modules/range.inc | 8 ++++---- lam/lib/modules/sambaDomain.inc | 2 +- lam/lib/modules/sambaGroupMapping.inc | 2 +- lam/lib/modules/sambaSamAccount.inc | 7 ++++--- lam/lib/modules/shadowAccount.inc | 2 +- lam/lib/modules/systemQuotas.inc | 2 +- lam/lib/pdf.inc | 3 ++- lam/lib/profiles.inc | 2 +- lam/lib/xml_parser.inc | 15 ++++++--------- 39 files changed, 142 insertions(+), 71 deletions(-) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index c8437b16..f965cbef 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -81,6 +81,9 @@ function array_delete($values, $array) { /** * Checks if a string exists in an array, ignoring case. + * + * @param String $needle search string + * @param array $haystack array */ function in_array_ignore_case($needle, $haystack) { if( ! is_array( $haystack ) ) @@ -308,6 +311,8 @@ function generateRandomPassword() { /** * Returns an array with all Samba 3 domain entries under the given suffix * +* @param handle LDAP handle (if null then $_SESSION['ldap']->server() is used) +* @param String $suffix LDAP suffix to search (if null then $_SESSION['config']->get_Suffix('smbDomain') is used) * @return array list of samba3domain objects */ function search_domains($server = null, $suffix = null) { @@ -774,6 +779,7 @@ function compareDN($a, $b) { /** * Formats an LDAP time string (e.g. from createTimestamp). * + * @param String $time LDAP time value * @return String formated time */ function formatLDAPTimestamp($time) { diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 287a5093..2cc8bb65 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -807,7 +807,6 @@ abstract class baseModule { *
* 'myAttribute' => 'AttrName123456789' * - * @param string $scope account type * @return array PDF entries * * @see baseModule::get_metaData() @@ -878,8 +877,8 @@ abstract class baseModule { * Returns an array which contains subarrays to generate StatusMessages if any errors occured. * * @param array $rawAccounts the user input data, contains one subarray for each account. - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/baseType.inc b/lam/lib/baseType.inc index 2a5db60d..854e3fef 100644 --- a/lam/lib/baseType.inc +++ b/lam/lib/baseType.inc @@ -35,7 +35,9 @@ $Id$ */ class baseType { + /** label to create another account */ public $LABEL_CREATE_ANOTHER_ACCOUNT; + /** label to return to account list */ public $LABEL_BACK_TO_ACCOUNT_LIST; /** diff --git a/lam/lib/config.inc b/lam/lib/config.inc index e250eae9..0aa65de3 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -1317,6 +1317,7 @@ class LAMCfgMain { /** minimum character classes (upper, lower, numeric, symbols) */ public $passwordMinClasses = 0; + /** path to config file */ private $conffile; /** list of data fields to save in config file */ diff --git a/lam/lib/html.inc b/lam/lib/html.inc index d3d45639..4df40fea 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -284,6 +284,7 @@ class htmlTable extends htmlElement { */ class htmlTableRow extends htmlElement { + /** table cells */ private $cells; /** additional CSS classes */ private $CSSClasses = ''; @@ -369,6 +370,7 @@ class htmlInputField extends htmlElement { * * @param String $fieldName unique field name * @param String $fieldValue value of input field (optional) + * @param String $fieldSize maximum input length */ function __construct($fieldName, $fieldValue = null, $fieldSize = null) { if (isObfuscatedText($fieldValue)) { @@ -1933,7 +1935,9 @@ class htmlImage extends htmlElement { */ class htmlSpacer extends htmlElement { + /** width of spacer in px */ private $width; + /** height of spacer in px */ private $height; /** @@ -1980,9 +1984,13 @@ class htmlSpacer extends htmlElement { */ class htmlStatusMessage extends htmlElement { + /** message type (e.g. ERROR) */ private $type; + /** message title */ private $title; + /** message text */ private $text; + /** message parameters */ private $params; /** @@ -1991,6 +1999,7 @@ class htmlStatusMessage extends htmlElement { * @param String $type message type (e.g. ERROR) * @param String $title message title * @param String $text message (optional) + * @param array $params additional message parameters */ function __construct($type, $title, $text = null, $params = null) { $this->type = $type; diff --git a/lam/lib/lamPDF.inc b/lam/lib/lamPDF.inc index 36c241cf..31967af8 100644 --- a/lam/lib/lamPDF.inc +++ b/lam/lib/lamPDF.inc @@ -59,10 +59,10 @@ class lamPDF extends UFPDF { ); /** + * Creates a new lamPDF object. * - * - * @param string $account_type - * @param array $page_definitions + * @param array $page_definitions page settings + * @param String $fontName font name */ function __construct($page_definitions = array(),$fontName) { $this->fontName = $fontName; @@ -88,7 +88,7 @@ class lamPDF extends UFPDF { } /** - * + * Creates the PDF page header. */ function header() { if($this->page_definitions['filename'] != 'none') { @@ -107,7 +107,7 @@ class lamPDF extends UFPDF { } /** - * + * Creates the PDF page footer. */ function footer() { $this->SetLineWidth(0.4); diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 13215fa7..d956f3b3 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -55,6 +55,7 @@ class Ldap{ /** Server handle */ private $server; + /** LDAP connection established */ private $is_connected = false; /** LDAP username used for bind */ @@ -66,6 +67,8 @@ class Ldap{ private $rand; /** + * Creates a new LDAP object. + * * @param object $config an object of class Config */ function __construct($config) { diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 09e81ae1..aa7a3c07 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -990,8 +990,11 @@ class lamList { */ class lamListTool { + /** tool name */ private $name; + /** tool image */ private $image; + /** link target */ private $target; /** @@ -1048,8 +1051,9 @@ class lamListTool { */ abstract class lamListOption { + /** unique ID */ private $ID; - + /** option value */ private $value; /** @@ -1116,6 +1120,7 @@ abstract class lamListOption { */ class lamBooleanListOption extends lamListOption { + /** option name */ private $name; /** @@ -1174,8 +1179,11 @@ class lamBooleanListOption extends lamListOption { */ class lamSelectListOption extends lamListOption { + /** option name */ private $name; + /** possible select options */ private $options; + /** help ID */ private $helpID; /** diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index c1d8abba..b579428d 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -266,8 +266,8 @@ class account extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index 83fef441..5a97e786 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -1283,8 +1283,8 @@ class asteriskAccount extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/asteriskExtension.inc b/lam/lib/modules/asteriskExtension.inc index 5b73458c..c6f7b9b1 100644 --- a/lam/lib/modules/asteriskExtension.inc +++ b/lam/lib/modules/asteriskExtension.inc @@ -45,12 +45,13 @@ class asteriskExtension extends baseModule { /** if true then the tree suffix will be used to search potential owners */ private $searchOwnersInTreeSuffix = false; - /* * Containe all attributes information for set of accounts */ + /** Contains all attributes information for set of accounts */ private $extensionRows = array(); - /* * Containe all original attributes information for set of accounts */ + /** Contains all original attributes information for set of accounts */ private $extensionRowsOrig = array(); - /* * Extension owners */ + /** extension owners */ private $extensionOwners = array(); + /** flag if new rule should be added */ private $addRuleFlag = false; /** @@ -368,6 +369,13 @@ class asteriskExtension extends baseModule { $renderContainer->addElement(new htmlSpacer(null, '5px'), true); } + /** + * Sorts an array of arrays by the given key. + * + * @param array $array array + * @param String $on key + * @param String $order order (SORT_ASC or SORT_DESC) + */ function array_sort($array, $on, $order='SORT_ASC') { $new_array = array(); $sortable_array = array(); @@ -720,6 +728,7 @@ class asteriskExtension extends baseModule { * and false otherwise. * Equal extension names are allowed in different OUs. * + * @param String $extension extension name * @return boolean true if there are entries with this extension name. */ function isThisExtensionPresented($extension) { @@ -833,8 +842,8 @@ class asteriskExtension extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ @@ -887,6 +896,7 @@ class asteriskExtension extends baseModule { /** * Get list of all applications for given extension and move it into new suffix. * + * @param array $rowOrig attributes of original extension * @return array list of error messages */ function moveExtentionToNewSuffix($rowOrig) { diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index 91ac9e9d..35342b41 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -419,8 +419,8 @@ class asteriskVoicemail extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/authorizedServiceObject.inc b/lam/lib/modules/authorizedServiceObject.inc index 3d80f8f3..e6e5bc59 100644 --- a/lam/lib/modules/authorizedServiceObject.inc +++ b/lam/lib/modules/authorizedServiceObject.inc @@ -239,8 +239,8 @@ class authorizedServiceObject extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/ddns.inc b/lam/lib/modules/ddns.inc index 18c6e86e..d37d020c 100644 --- a/lam/lib/modules/ddns.inc +++ b/lam/lib/modules/ddns.inc @@ -39,7 +39,7 @@ $Id$ class ddns extends baseModule { - // Standard DDNS Settings + /** standard DDNS settings */ public $ddns = array(); @@ -471,7 +471,7 @@ class ddns extends baseModule { /** * Sets if DDNS is activated. * - * $activated boolean activated + * @param boolean $activated activated */ private function setDynDNSActivated($activated) { if (is_array($this->attributes['dhcpStatements'])) { @@ -511,7 +511,7 @@ class ddns extends baseModule { /** * Sets if client updates are ignored. * - * $add boolean add fixed IPs + * @param boolean $add add fixed IPs */ private function setFixIPs($add) { if (is_array($this->attributes['dhcpStatements'])) { @@ -548,7 +548,7 @@ class ddns extends baseModule { /** * Sets if client updates are ignored. * - * $ignore boolean ignore client updates + * @param boolean $ignore ignore client updates */ private function setIgnoreClientUpdates($ignore) { if (is_array($this->attributes['dhcpStatements'])) { @@ -585,7 +585,7 @@ class ddns extends baseModule { /** * Sets the key for DNS updates. * - * $key String key + * @param String $key key */ private function setUpdateKey($key) { if (!is_array($this->attributes['dhcpStatements'])) { @@ -620,8 +620,8 @@ class ddns extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index 877b8c15..3f5ef591 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -39,7 +39,14 @@ $Id$ * @return boolean true or false **/ if (!function_exists('check_ip')) { - function check_ip($ip,$subnet=false) { + + /** + * Checks if the given IP is valid. + * + * @param String $ip IP address + * @param boolean $subnet IP must be a subnet + */ + function check_ip($ip, $subnet = false) { $part = explode(".", $ip); // Wenn... Keine 4 Segmente gefunden wurde if (count($part) != 4) { @@ -71,9 +78,9 @@ if (!function_exists('check_ip')) { */ class dhcp_settings extends baseModule { - // All netbios node types: + /** all netbios node types */ private $all_netbios_node_types; - + /** LDAP attributes */ public $attributes; /** @@ -760,8 +767,8 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ @@ -787,7 +794,7 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I array_push($error, $i); $messages[] = $error; } - elseif (preg_match("/^[A-Za-z0-9\._-]*$/", $rawAccounts[$i][$ids['dhcp_settings_domainName']])) { + elseif (preg_match("/^[A-Za-z0-9\\._-]*$/", $rawAccounts[$i][$ids['dhcp_settings_domainName']])) { $partialAccounts[$i]['dhcpOption'][] = "domain-name \"".$rawAccounts[$i][$ids['dhcp_settings_domainName']]."\""; } else { diff --git a/lam/lib/modules/eduPerson.inc b/lam/lib/modules/eduPerson.inc index 7e048805..96e7c72d 100644 --- a/lam/lib/modules/eduPerson.inc +++ b/lam/lib/modules/eduPerson.inc @@ -34,6 +34,7 @@ $Id$ */ class eduPerson extends baseModule { + /** possible affiliation types */ private $affiliationTypes = array('faculty', 'student', 'staff', 'alum', 'member', 'affiliate', 'employee', 'library-walk-in'); @@ -538,8 +539,8 @@ class eduPerson extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/fixed_ip.inc b/lam/lib/modules/fixed_ip.inc index 5ba23581..962e0a73 100644 --- a/lam/lib/modules/fixed_ip.inc +++ b/lam/lib/modules/fixed_ip.inc @@ -40,18 +40,19 @@ $Id$ class fixed_ip extends baseModule { - // fixed ips + /** fixed ips */ public $fixed_ip; - // already processed? + /** already processed? */ public $processed = false; - // For check, if IPs overlapd. + /** for check if IPs overlap */ public $overlapd; - // Original IPs + /** original IPs */ public $orig_ips = array(); + /** LDAP attributes */ public $attributes; /** @@ -297,7 +298,7 @@ class fixed_ip extends baseModule { if (strlen($_POST['pc_'.$id])>30) { $error = true; } - if (!preg_match("/^[A-Za-z0-9\._-]*$/",$_POST['pc_'.$id])) { + if (!preg_match("/^[A-Za-z0-9\\._-]*$/",$_POST['pc_'.$id])) { $error = true; } $this->fixed_ip[$id]['cn'] = $_POST['pc_'.$id]; @@ -365,7 +366,7 @@ class fixed_ip extends baseModule { elseif (in_array($this->fixed_ip[$id]['cn'], $pcs) ) { $pcError = _("This PC name already exists."); } - elseif (isset($_POST['pc_'.$id]) && !preg_match("/^[A-Za-z0-9\._-]*$/", $_POST['pc_'.$id])) { + elseif (isset($_POST['pc_'.$id]) && !preg_match("/^[A-Za-z0-9\\._-]*$/", $_POST['pc_'.$id])) { $pcError = _("The PC name may only contain A-Z, a-z and 0-9."); } $pcs[] = $this->fixed_ip[$id]['cn']; diff --git a/lam/lib/modules/freeRadius.inc b/lam/lib/modules/freeRadius.inc index 6a44ee19..ef0a4c19 100644 --- a/lam/lib/modules/freeRadius.inc +++ b/lam/lib/modules/freeRadius.inc @@ -34,6 +34,7 @@ $Id$ */ class freeRadius extends baseModule { + /** list of possible months */ private static $monthList = array('01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec' ); @@ -518,8 +519,8 @@ class freeRadius extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/hostObject.inc b/lam/lib/modules/hostObject.inc index 96d5647d..6ba392b5 100644 --- a/lam/lib/modules/hostObject.inc +++ b/lam/lib/modules/hostObject.inc @@ -216,8 +216,8 @@ class hostObject extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/ieee802device.inc b/lam/lib/modules/ieee802device.inc index 7dc437fb..f3758ae7 100644 --- a/lam/lib/modules/ieee802device.inc +++ b/lam/lib/modules/ieee802device.inc @@ -166,8 +166,8 @@ class ieee802Device extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index 825bc3a7..0cb91221 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -38,6 +38,7 @@ $Id$ */ class imapAccess extends baseModule { + /** quota limit from profile */ private $profileQuotaLimit = null; /** @@ -275,6 +276,7 @@ class imapAccess extends baseModule { * * @param htmlTable $htmlTable structure that contained information to be displayed * @param stream $mbox stream to open IMAP session + * @param String $username user name to connect to IMAP server * @return htmlTable table with added information about user quotas or controls to add quota */ function renderQuotasForMailbox($htmlTable, $mbox, $username) { @@ -523,6 +525,7 @@ class imapAccess extends baseModule { * This function checks if the domain of the mailbox is not in the list of domains listed in the configuration. * If it is in the list then it returns false, otherwise returns true. If the list of domains is not set then it returns true. * + * @param String $email_domain email domain * @return boolean true if domains match */ function isWrongDomain($email_domain) { diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index 6d445eb4..33811798 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -236,8 +236,8 @@ class inetLocalMailRecipient extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index c3fd31ec..6b1d1783 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -39,6 +39,7 @@ class inetOrgPerson extends baseModule implements passwordService { /** caches the list of possible managers */ private $cachedManagers = null; + /** clear text password */ private $clearTextPassword = null; /** @@ -2222,8 +2223,8 @@ class inetOrgPerson extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 4221cd6f..a49448c8 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -624,8 +624,8 @@ class kolabUser extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/ldapPublicKey.inc b/lam/lib/modules/ldapPublicKey.inc index 285d5954..c0856d09 100644 --- a/lam/lib/modules/ldapPublicKey.inc +++ b/lam/lib/modules/ldapPublicKey.inc @@ -145,8 +145,8 @@ class ldapPublicKey extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/nisMailAlias.inc b/lam/lib/modules/nisMailAlias.inc index 70d75b87..76071576 100644 --- a/lam/lib/modules/nisMailAlias.inc +++ b/lam/lib/modules/nisMailAlias.inc @@ -237,8 +237,8 @@ class nisMailAlias extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/nisnetgroup.inc b/lam/lib/modules/nisnetgroup.inc index 74e58585..db1b3d71 100644 --- a/lam/lib/modules/nisnetgroup.inc +++ b/lam/lib/modules/nisnetgroup.inc @@ -36,8 +36,11 @@ $Id$ class nisnetgroup extends baseModule { /* caches to reduce LDAP queries */ + /** user cache */ private $cachedUserList = null; + /** host cache */ private $cachedHostList = null; + /** group cache */ private $cachedGroupList = null; /** @@ -508,8 +511,8 @@ class nisnetgroup extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 4c5b378e..f09b232f 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -40,19 +40,27 @@ class posixAccount extends baseModule implements passwordService { // Variables + /** delimiter for lamdaemon commands */ private static $SPLIT_DELIMITER = "###x##y##x###"; /* These two variables keep an array of groups the user is also member of. */ + /** current group list */ private $groups; + /** original group list */ private $groups_orig; /* list of group of names that the user is member of */ + /** current group of names list */ private $gonList = array(); + /** original group of names list */ private $gonList_orig = array(); - + /** lamdaemon servers */ private $lamdaemonServers = array(); + /** cache for group objects */ private $groupCache = null; + /** cache for group of names objects */ private $gonCache = null; + /** clear text password */ private $clearTextPassword; /** caches the list of known UIDs */ private $cachedUIDList = null; @@ -569,6 +577,8 @@ class posixAccount extends baseModule implements passwordService { } /** + * Runs the postmodify actions. + * * @see baseModule::postModifyActions() * * @param boolean $newAccount @@ -1580,8 +1590,8 @@ class posixAccount extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 68230894..0c87d445 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -54,8 +54,8 @@ class posixGroup extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ @@ -469,7 +469,11 @@ class posixGroup extends baseModule implements passwordService { } - /** This functin will be called when the module will be loaded **/ + /** + * This functin will be called when the module will be loaded + * + * @param String $base the name of the {@link accountContainer} object ($_SESSION[$base]) + */ function init($base) { // call parent init parent::init($base); diff --git a/lam/lib/modules/quota.inc b/lam/lib/modules/quota.inc index 3f4b1291..6fb54f16 100644 --- a/lam/lib/modules/quota.inc +++ b/lam/lib/modules/quota.inc @@ -39,8 +39,9 @@ $Id$ */ class quota extends baseModule { + /** delimiter for lamdaemon commands */ private static $SPLIT_DELIMITER = "###x##y##x###"; - + /** prefix for lamdaemon results */ private static $QUOTA_PREFIX = 'QUOTA_ENTRY '; /** this functin fills the error message array with messages @@ -232,9 +233,11 @@ class quota extends baseModule { } /** + * Quotas are set in postmodify. + * * @see baseModule::postModifyActions() * - * @param boolean $newAccount + * @param boolean $newAccount is new account * @param array $attributes LDAP attributes of this entry * @return array array which contains status messages. Each entry is an array containing the status message parameters. */ diff --git a/lam/lib/modules/range.inc b/lam/lib/modules/range.inc index bd09dfa9..b1f2960e 100644 --- a/lam/lib/modules/range.inc +++ b/lam/lib/modules/range.inc @@ -40,16 +40,16 @@ $Id$ class range extends baseModule { - // subnet + /** subnet */ public $subnet; - // ranges + /** ranges */ public $ranges; - // Range -> Function attibute_processed already running? + /** Range -> Function attibute_processed already running? */ public $processed; - // For check, if IPs overlaped. + /** For check, if IPs overlaped. */ public $overlaped; /** diff --git a/lam/lib/modules/sambaDomain.inc b/lam/lib/modules/sambaDomain.inc index 310f5646..07ca49fe 100644 --- a/lam/lib/modules/sambaDomain.inc +++ b/lam/lib/modules/sambaDomain.inc @@ -545,8 +545,8 @@ class sambaDomain extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 74d0193c..899edd65 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -159,8 +159,8 @@ class sambaGroupMapping extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 225dd129..e4c8eeff 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -56,8 +56,9 @@ class sambaSamAccount extends baseModule implements passwordService { 'B' => '1011', 'C' => '1100', 'D' => '1101', 'E' => '1110', 'F' => '1111'); /** specifies if the password should be expired */ private $expirePassword = false; - /* cache to reduce LDAP queries */ + /** host cache to reduce LDAP queries */ private $cachedHostList = null; + /** group cache to reduce LDAP queries */ private $cachedGroupSIDList = null; /** cache for domain list */ private $cachedDomainList = null; @@ -638,7 +639,7 @@ class sambaSamAccount extends baseModule implements passwordService { /** * This function loads the LDAP attributes for this module. * - * @param array $attributes attribute list + * @param array $attr attribute list */ function load_attributes($attr) { parent::load_attributes($attr); @@ -1776,8 +1777,8 @@ class sambaSamAccount extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index d3c48489..395d4047 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -491,8 +491,8 @@ class shadowAccount extends baseModule implements passwordService { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/modules/systemQuotas.inc b/lam/lib/modules/systemQuotas.inc index e1069bad..90ad5fd1 100644 --- a/lam/lib/modules/systemQuotas.inc +++ b/lam/lib/modules/systemQuotas.inc @@ -342,8 +342,8 @@ class systemQuotas extends baseModule { * In this function the LDAP account is built up. * * @param array $rawAccounts list of hash arrays (name => value) from user input - * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5) + * @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP * @param array $selectedModules list of selected account modules * @return array list of error messages if any */ diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index 2fd7f53f..8145cbbb 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -181,10 +181,11 @@ function getSectionHeadline($line) { * * @param string $line XML code of PDF entry * @param boolean $first_td True if this is the first column + * @param String $fontName font name * * @return array XML codes */ -function processLine($line,$first_td = true, $fontName) { +function processLine($line, $first_td = true, $fontName) { global $key, $line_width; // PCRE matching tag diff --git a/lam/lib/profiles.inc b/lam/lib/profiles.inc index 69a2ec9e..d5abe2d6 100644 --- a/lam/lib/profiles.inc +++ b/lam/lib/profiles.inc @@ -102,8 +102,8 @@ function loadAccountProfile($profile, $scope) { * * file is created, if needed * -* @param string $profile name of the account profile (without . extension) * @param array $attributes hash array (attribute => value) +* @param string $profile name of the account profile (without . extension) * @param string $scope account type * @return boolean true, if saving succeeded */ diff --git a/lam/lib/xml_parser.inc b/lam/lib/xml_parser.inc index 4aec485c..e44e0a8c 100644 --- a/lam/lib/xml_parser.inc +++ b/lam/lib/xml_parser.inc @@ -21,23 +21,21 @@ $Id$ */ /** - * LDAP Account Manager xmlParser class + * Simple XML parser. * * @author Michael Duergner * @package PDF */ /** - * + * Simple XML parser. * * @author Michael Duergner * @package PDF */ class xmlParser { - /** - * - */ + /** XML parser */ private $xmlParser; /** @@ -51,11 +49,10 @@ class xmlParser { } /** + * Starts the parsing. * - * - * @param string - * - * @return array + * @param String $filename file name + * @return array XML structure */ function parse($filename) { if(file_exists($filename)) {