PHPDoc update

This commit is contained in:
Roland Gruber 2012-07-15 12:05:47 +00:00
parent 435632d7a7
commit 1607bd8ee5
39 changed files with 142 additions and 71 deletions

View File

@ -81,6 +81,9 @@ function array_delete($values, $array) {
/** /**
* Checks if a string exists in an array, ignoring case. * 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) { function in_array_ignore_case($needle, $haystack) {
if( ! is_array( $haystack ) ) if( ! is_array( $haystack ) )
@ -308,6 +311,8 @@ function generateRandomPassword() {
/** /**
* Returns an array with all Samba 3 domain entries under the given suffix * 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 * @return array list of samba3domain objects
*/ */
function search_domains($server = null, $suffix = null) { function search_domains($server = null, $suffix = null) {
@ -774,6 +779,7 @@ function compareDN($a, $b) {
/** /**
* Formats an LDAP time string (e.g. from createTimestamp). * Formats an LDAP time string (e.g. from createTimestamp).
* *
* @param String $time LDAP time value
* @return String formated time * @return String formated time
*/ */
function formatLDAPTimestamp($time) { function formatLDAPTimestamp($time) {

View File

@ -807,7 +807,6 @@ abstract class baseModule {
* <br> * <br>
* 'myAttribute' => '<block><key>AttrName</key><tr><td align=\"L\">123</td></tr></block><block><tr><td align=\"L\">456</td></tr></block><block><tr><td align=\"L\">789</td></tr></block>' * 'myAttribute' => '<block><key>AttrName</key><tr><td align=\"L\">123</td></tr></block><block><tr><td align=\"L\">456</td></tr></block><block><tr><td align=\"L\">789</td></tr></block>'
* *
* @param string $scope account type
* @return array PDF entries * @return array PDF entries
* *
* @see baseModule::get_metaData() * @see baseModule::get_metaData()
@ -878,8 +877,8 @@ abstract class baseModule {
* Returns an array which contains subarrays to generate StatusMessages if any errors occured. * 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 $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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -35,7 +35,9 @@ $Id$
*/ */
class baseType { class baseType {
/** label to create another account */
public $LABEL_CREATE_ANOTHER_ACCOUNT; public $LABEL_CREATE_ANOTHER_ACCOUNT;
/** label to return to account list */
public $LABEL_BACK_TO_ACCOUNT_LIST; public $LABEL_BACK_TO_ACCOUNT_LIST;
/** /**

View File

@ -1317,6 +1317,7 @@ class LAMCfgMain {
/** minimum character classes (upper, lower, numeric, symbols) */ /** minimum character classes (upper, lower, numeric, symbols) */
public $passwordMinClasses = 0; public $passwordMinClasses = 0;
/** path to config file */
private $conffile; private $conffile;
/** list of data fields to save in config file */ /** list of data fields to save in config file */

View File

@ -284,6 +284,7 @@ class htmlTable extends htmlElement {
*/ */
class htmlTableRow extends htmlElement { class htmlTableRow extends htmlElement {
/** table cells */
private $cells; private $cells;
/** additional CSS classes */ /** additional CSS classes */
private $CSSClasses = ''; private $CSSClasses = '';
@ -369,6 +370,7 @@ class htmlInputField extends htmlElement {
* *
* @param String $fieldName unique field name * @param String $fieldName unique field name
* @param String $fieldValue value of input field (optional) * @param String $fieldValue value of input field (optional)
* @param String $fieldSize maximum input length
*/ */
function __construct($fieldName, $fieldValue = null, $fieldSize = null) { function __construct($fieldName, $fieldValue = null, $fieldSize = null) {
if (isObfuscatedText($fieldValue)) { if (isObfuscatedText($fieldValue)) {
@ -1933,7 +1935,9 @@ class htmlImage extends htmlElement {
*/ */
class htmlSpacer extends htmlElement { class htmlSpacer extends htmlElement {
/** width of spacer in px */
private $width; private $width;
/** height of spacer in px */
private $height; private $height;
/** /**
@ -1980,9 +1984,13 @@ class htmlSpacer extends htmlElement {
*/ */
class htmlStatusMessage extends htmlElement { class htmlStatusMessage extends htmlElement {
/** message type (e.g. ERROR) */
private $type; private $type;
/** message title */
private $title; private $title;
/** message text */
private $text; private $text;
/** message parameters */
private $params; private $params;
/** /**
@ -1991,6 +1999,7 @@ class htmlStatusMessage extends htmlElement {
* @param String $type message type (e.g. ERROR) * @param String $type message type (e.g. ERROR)
* @param String $title message title * @param String $title message title
* @param String $text message (optional) * @param String $text message (optional)
* @param array $params additional message parameters
*/ */
function __construct($type, $title, $text = null, $params = null) { function __construct($type, $title, $text = null, $params = null) {
$this->type = $type; $this->type = $type;

View File

@ -59,10 +59,10 @@ class lamPDF extends UFPDF {
); );
/** /**
* Creates a new lamPDF object.
* *
* * @param array $page_definitions page settings
* @param string $account_type * @param String $fontName font name
* @param array $page_definitions
*/ */
function __construct($page_definitions = array(),$fontName) { function __construct($page_definitions = array(),$fontName) {
$this->fontName = $fontName; $this->fontName = $fontName;
@ -88,7 +88,7 @@ class lamPDF extends UFPDF {
} }
/** /**
* * Creates the PDF page header.
*/ */
function header() { function header() {
if($this->page_definitions['filename'] != 'none') { if($this->page_definitions['filename'] != 'none') {
@ -107,7 +107,7 @@ class lamPDF extends UFPDF {
} }
/** /**
* * Creates the PDF page footer.
*/ */
function footer() { function footer() {
$this->SetLineWidth(0.4); $this->SetLineWidth(0.4);

View File

@ -55,6 +55,7 @@ class Ldap{
/** Server handle */ /** Server handle */
private $server; private $server;
/** LDAP connection established */
private $is_connected = false; private $is_connected = false;
/** LDAP username used for bind */ /** LDAP username used for bind */
@ -66,6 +67,8 @@ class Ldap{
private $rand; private $rand;
/** /**
* Creates a new LDAP object.
*
* @param object $config an object of class Config * @param object $config an object of class Config
*/ */
function __construct($config) { function __construct($config) {

View File

@ -990,8 +990,11 @@ class lamList {
*/ */
class lamListTool { class lamListTool {
/** tool name */
private $name; private $name;
/** tool image */
private $image; private $image;
/** link target */
private $target; private $target;
/** /**
@ -1048,8 +1051,9 @@ class lamListTool {
*/ */
abstract class lamListOption { abstract class lamListOption {
/** unique ID */
private $ID; private $ID;
/** option value */
private $value; private $value;
/** /**
@ -1116,6 +1120,7 @@ abstract class lamListOption {
*/ */
class lamBooleanListOption extends lamListOption { class lamBooleanListOption extends lamListOption {
/** option name */
private $name; private $name;
/** /**
@ -1174,8 +1179,11 @@ class lamBooleanListOption extends lamListOption {
*/ */
class lamSelectListOption extends lamListOption { class lamSelectListOption extends lamListOption {
/** option name */
private $name; private $name;
/** possible select options */
private $options; private $options;
/** help ID */
private $helpID; private $helpID;
/** /**

View File

@ -266,8 +266,8 @@ class account extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -1283,8 +1283,8 @@ class asteriskAccount extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -45,12 +45,13 @@ class asteriskExtension extends baseModule {
/** if true then the tree suffix will be used to search potential owners */ /** if true then the tree suffix will be used to search potential owners */
private $searchOwnersInTreeSuffix = false; private $searchOwnersInTreeSuffix = false;
/* * Containe all attributes information for set of accounts */ /** Contains all attributes information for set of accounts */
private $extensionRows = array(); private $extensionRows = array();
/* * Containe all original attributes information for set of accounts */ /** Contains all original attributes information for set of accounts */
private $extensionRowsOrig = array(); private $extensionRowsOrig = array();
/* * Extension owners */ /** extension owners */
private $extensionOwners = array(); private $extensionOwners = array();
/** flag if new rule should be added */
private $addRuleFlag = false; private $addRuleFlag = false;
/** /**
@ -368,6 +369,13 @@ class asteriskExtension extends baseModule {
$renderContainer->addElement(new htmlSpacer(null, '5px'), true); $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') { function array_sort($array, $on, $order='SORT_ASC') {
$new_array = array(); $new_array = array();
$sortable_array = array(); $sortable_array = array();
@ -720,6 +728,7 @@ class asteriskExtension extends baseModule {
* and false otherwise. * and false otherwise.
* Equal extension names are allowed in different OUs. * Equal extension names are allowed in different OUs.
* *
* @param String $extension extension name
* @return boolean true if there are entries with this extension name. * @return boolean true if there are entries with this extension name.
*/ */
function isThisExtensionPresented($extension) { function isThisExtensionPresented($extension) {
@ -833,8 +842,8 @@ class asteriskExtension extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @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. * 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 * @return array list of error messages
*/ */
function moveExtentionToNewSuffix($rowOrig) { function moveExtentionToNewSuffix($rowOrig) {

View File

@ -419,8 +419,8 @@ class asteriskVoicemail extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -239,8 +239,8 @@ class authorizedServiceObject extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -39,7 +39,7 @@ $Id$
class ddns extends baseModule { class ddns extends baseModule {
// Standard DDNS Settings /** standard DDNS settings */
public $ddns = array(); public $ddns = array();
@ -471,7 +471,7 @@ class ddns extends baseModule {
/** /**
* Sets if DDNS is activated. * Sets if DDNS is activated.
* *
* $activated boolean activated * @param boolean $activated activated
*/ */
private function setDynDNSActivated($activated) { private function setDynDNSActivated($activated) {
if (is_array($this->attributes['dhcpStatements'])) { if (is_array($this->attributes['dhcpStatements'])) {
@ -511,7 +511,7 @@ class ddns extends baseModule {
/** /**
* Sets if client updates are ignored. * Sets if client updates are ignored.
* *
* $add boolean add fixed IPs * @param boolean $add add fixed IPs
*/ */
private function setFixIPs($add) { private function setFixIPs($add) {
if (is_array($this->attributes['dhcpStatements'])) { if (is_array($this->attributes['dhcpStatements'])) {
@ -548,7 +548,7 @@ class ddns extends baseModule {
/** /**
* Sets if client updates are ignored. * Sets if client updates are ignored.
* *
* $ignore boolean ignore client updates * @param boolean $ignore ignore client updates
*/ */
private function setIgnoreClientUpdates($ignore) { private function setIgnoreClientUpdates($ignore) {
if (is_array($this->attributes['dhcpStatements'])) { if (is_array($this->attributes['dhcpStatements'])) {
@ -585,7 +585,7 @@ class ddns extends baseModule {
/** /**
* Sets the key for DNS updates. * Sets the key for DNS updates.
* *
* $key String key * @param String $key key
*/ */
private function setUpdateKey($key) { private function setUpdateKey($key) {
if (!is_array($this->attributes['dhcpStatements'])) { if (!is_array($this->attributes['dhcpStatements'])) {
@ -620,8 +620,8 @@ class ddns extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -39,7 +39,14 @@ $Id$
* @return boolean true or false * @return boolean true or false
**/ **/
if (!function_exists('check_ip')) { 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); $part = explode(".", $ip);
// Wenn... Keine 4 Segmente gefunden wurde // Wenn... Keine 4 Segmente gefunden wurde
if (count($part) != 4) { if (count($part) != 4) {
@ -71,9 +78,9 @@ if (!function_exists('check_ip')) {
*/ */
class dhcp_settings extends baseModule { class dhcp_settings extends baseModule {
// All netbios node types: /** all netbios node types */
private $all_netbios_node_types; private $all_netbios_node_types;
/** LDAP attributes */
public $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. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @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); array_push($error, $i);
$messages[] = $error; $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']]."\""; $partialAccounts[$i]['dhcpOption'][] = "domain-name \"".$rawAccounts[$i][$ids['dhcp_settings_domainName']]."\"";
} }
else { else {

View File

@ -34,6 +34,7 @@ $Id$
*/ */
class eduPerson extends baseModule { class eduPerson extends baseModule {
/** possible affiliation types */
private $affiliationTypes = array('faculty', 'student', 'staff', 'alum', private $affiliationTypes = array('faculty', 'student', 'staff', 'alum',
'member', 'affiliate', 'employee', 'library-walk-in'); 'member', 'affiliate', 'employee', 'library-walk-in');
@ -538,8 +539,8 @@ class eduPerson extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -40,18 +40,19 @@ $Id$
class fixed_ip extends baseModule { class fixed_ip extends baseModule {
// fixed ips /** fixed ips */
public $fixed_ip; public $fixed_ip;
// already processed? /** already processed? */
public $processed = false; public $processed = false;
// For check, if IPs overlapd. /** for check if IPs overlap */
public $overlapd; public $overlapd;
// Original IPs /** original IPs */
public $orig_ips = array(); public $orig_ips = array();
/** LDAP attributes */
public $attributes; public $attributes;
/** /**
@ -297,7 +298,7 @@ class fixed_ip extends baseModule {
if (strlen($_POST['pc_'.$id])>30) { if (strlen($_POST['pc_'.$id])>30) {
$error = true; $error = true;
} }
if (!preg_match("/^[A-Za-z0-9\._-]*$/",$_POST['pc_'.$id])) { if (!preg_match("/^[A-Za-z0-9\\._-]*$/",$_POST['pc_'.$id])) {
$error = true; $error = true;
} }
$this->fixed_ip[$id]['cn'] = $_POST['pc_'.$id]; $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) ) { elseif (in_array($this->fixed_ip[$id]['cn'], $pcs) ) {
$pcError = _("This PC name already exists."); $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."); $pcError = _("The PC name may only contain A-Z, a-z and 0-9.");
} }
$pcs[] = $this->fixed_ip[$id]['cn']; $pcs[] = $this->fixed_ip[$id]['cn'];

View File

@ -34,6 +34,7 @@ $Id$
*/ */
class freeRadius extends baseModule { class freeRadius extends baseModule {
/** list of possible months */
private static $monthList = array('01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', 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' '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. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -216,8 +216,8 @@ class hostObject extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -166,8 +166,8 @@ class ieee802Device extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -38,6 +38,7 @@ $Id$
*/ */
class imapAccess extends baseModule { class imapAccess extends baseModule {
/** quota limit from profile */
private $profileQuotaLimit = null; private $profileQuotaLimit = null;
/** /**
@ -275,6 +276,7 @@ class imapAccess extends baseModule {
* *
* @param htmlTable $htmlTable structure that contained information to be displayed * @param htmlTable $htmlTable structure that contained information to be displayed
* @param stream $mbox stream to open IMAP session * @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 * @return htmlTable table with added information about user quotas or controls to add quota
*/ */
function renderQuotasForMailbox($htmlTable, $mbox, $username) { 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. * 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. * 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 * @return boolean true if domains match
*/ */
function isWrongDomain($email_domain) { function isWrongDomain($email_domain) {

View File

@ -236,8 +236,8 @@ class inetLocalMailRecipient extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -39,6 +39,7 @@ class inetOrgPerson extends baseModule implements passwordService {
/** caches the list of possible managers */ /** caches the list of possible managers */
private $cachedManagers = null; private $cachedManagers = null;
/** clear text password */
private $clearTextPassword = null; private $clearTextPassword = null;
/** /**
@ -2222,8 +2223,8 @@ class inetOrgPerson extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -624,8 +624,8 @@ class kolabUser extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -145,8 +145,8 @@ class ldapPublicKey extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -237,8 +237,8 @@ class nisMailAlias extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -36,8 +36,11 @@ $Id$
class nisnetgroup extends baseModule { class nisnetgroup extends baseModule {
/* caches to reduce LDAP queries */ /* caches to reduce LDAP queries */
/** user cache */
private $cachedUserList = null; private $cachedUserList = null;
/** host cache */
private $cachedHostList = null; private $cachedHostList = null;
/** group cache */
private $cachedGroupList = null; private $cachedGroupList = null;
/** /**
@ -508,8 +511,8 @@ class nisnetgroup extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -40,19 +40,27 @@
class posixAccount extends baseModule implements passwordService { class posixAccount extends baseModule implements passwordService {
// Variables // Variables
/** delimiter for lamdaemon commands */
private static $SPLIT_DELIMITER = "###x##y##x###"; private static $SPLIT_DELIMITER = "###x##y##x###";
/* These two variables keep an array of groups the user is also member of. */ /* These two variables keep an array of groups the user is also member of. */
/** current group list */
private $groups; private $groups;
/** original group list */
private $groups_orig; private $groups_orig;
/* list of group of names that the user is member of */ /* list of group of names that the user is member of */
/** current group of names list */
private $gonList = array(); private $gonList = array();
/** original group of names list */
private $gonList_orig = array(); private $gonList_orig = array();
/** lamdaemon servers */
private $lamdaemonServers = array(); private $lamdaemonServers = array();
/** cache for group objects */
private $groupCache = null; private $groupCache = null;
/** cache for group of names objects */
private $gonCache = null; private $gonCache = null;
/** clear text password */
private $clearTextPassword; private $clearTextPassword;
/** caches the list of known UIDs */ /** caches the list of known UIDs */
private $cachedUIDList = null; private $cachedUIDList = null;
@ -569,6 +577,8 @@ class posixAccount extends baseModule implements passwordService {
} }
/** /**
* Runs the postmodify actions.
*
* @see baseModule::postModifyActions() * @see baseModule::postModifyActions()
* *
* @param boolean $newAccount * @param boolean $newAccount
@ -1580,8 +1590,8 @@ class posixAccount extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -54,8 +54,8 @@ class posixGroup extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @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) { function init($base) {
// call parent init // call parent init
parent::init($base); parent::init($base);

View File

@ -39,8 +39,9 @@ $Id$
*/ */
class quota extends baseModule { class quota extends baseModule {
/** delimiter for lamdaemon commands */
private static $SPLIT_DELIMITER = "###x##y##x###"; private static $SPLIT_DELIMITER = "###x##y##x###";
/** prefix for lamdaemon results */
private static $QUOTA_PREFIX = 'QUOTA_ENTRY '; private static $QUOTA_PREFIX = 'QUOTA_ENTRY ';
/** this functin fills the error message array with messages /** 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() * @see baseModule::postModifyActions()
* *
* @param boolean $newAccount * @param boolean $newAccount is new account
* @param array $attributes LDAP attributes of this entry * @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. * @return array array which contains status messages. Each entry is an array containing the status message parameters.
*/ */

View File

@ -40,16 +40,16 @@ $Id$
class range extends baseModule { class range extends baseModule {
// subnet /** subnet */
public $subnet; public $subnet;
// ranges /** ranges */
public $ranges; public $ranges;
// Range -> Function attibute_processed already running? /** Range -> Function attibute_processed already running? */
public $processed; public $processed;
// For check, if IPs overlaped. /** For check, if IPs overlaped. */
public $overlaped; public $overlaped;
/** /**

View File

@ -545,8 +545,8 @@ class sambaDomain extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -159,8 +159,8 @@ class sambaGroupMapping extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -56,8 +56,9 @@ class sambaSamAccount extends baseModule implements passwordService {
'B' => '1011', 'C' => '1100', 'D' => '1101', 'E' => '1110', 'F' => '1111'); 'B' => '1011', 'C' => '1100', 'D' => '1101', 'E' => '1110', 'F' => '1111');
/** specifies if the password should be expired */ /** specifies if the password should be expired */
private $expirePassword = false; private $expirePassword = false;
/* cache to reduce LDAP queries */ /** host cache to reduce LDAP queries */
private $cachedHostList = null; private $cachedHostList = null;
/** group cache to reduce LDAP queries */
private $cachedGroupSIDList = null; private $cachedGroupSIDList = null;
/** cache for domain list */ /** cache for domain list */
private $cachedDomainList = null; private $cachedDomainList = null;
@ -638,7 +639,7 @@ class sambaSamAccount extends baseModule implements passwordService {
/** /**
* This function loads the LDAP attributes for this module. * This function loads the LDAP attributes for this module.
* *
* @param array $attributes attribute list * @param array $attr attribute list
*/ */
function load_attributes($attr) { function load_attributes($attr) {
parent::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. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -491,8 +491,8 @@ class shadowAccount extends baseModule implements passwordService {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -342,8 +342,8 @@ class systemQuotas extends baseModule {
* In this function the LDAP account is built up. * In this function the LDAP account is built up.
* *
* @param array $rawAccounts list of hash arrays (name => value) from user input * @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 $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 * @param array $selectedModules list of selected account modules
* @return array list of error messages if any * @return array list of error messages if any
*/ */

View File

@ -181,10 +181,11 @@ function getSectionHeadline($line) {
* *
* @param string $line XML code of PDF entry * @param string $line XML code of PDF entry
* @param boolean $first_td True if this is the first column * @param boolean $first_td True if this is the first column
* @param String $fontName font name
* *
* @return array XML codes * @return array XML codes
*/ */
function processLine($line,$first_td = true, $fontName) { function processLine($line, $first_td = true, $fontName) {
global $key, $line_width; global $key, $line_width;
// PCRE matching <block> tag // PCRE matching <block> tag

View File

@ -102,8 +102,8 @@ function loadAccountProfile($profile, $scope) {
* *
* file is created, if needed * file is created, if needed
* *
* @param string $profile name of the account profile (without .<scope> extension)
* @param array $attributes hash array (attribute => value) * @param array $attributes hash array (attribute => value)
* @param string $profile name of the account profile (without .<scope> extension)
* @param string $scope account type * @param string $scope account type
* @return boolean true, if saving succeeded * @return boolean true, if saving succeeded
*/ */

View File

@ -21,23 +21,21 @@ $Id$
*/ */
/** /**
* LDAP Account Manager xmlParser class * Simple XML parser.
* *
* @author Michael Duergner * @author Michael Duergner
* @package PDF * @package PDF
*/ */
/** /**
* * Simple XML parser.
* *
* @author Michael Duergner * @author Michael Duergner
* @package PDF * @package PDF
*/ */
class xmlParser { class xmlParser {
/** /** XML parser */
*
*/
private $xmlParser; private $xmlParser;
/** /**
@ -51,11 +49,10 @@ class xmlParser {
} }
/** /**
* Starts the parsing.
* *
* * @param String $filename file name
* @param string * @return array XML structure
*
* @return array
*/ */
function parse($filename) { function parse($filename) {
if(file_exists($filename)) { if(file_exists($filename)) {