diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index b561f7ba..a2d877f3 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) Copyright (C) 2009 - 2012 Pavel Pozdnyak - 2009 - 2012 Roland Gruber + 2009 - 2013 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 @@ -1185,97 +1185,39 @@ class asteriskAccount extends baseModule implements passwordService { */ function get_pdfEntries() { $return = array(); - $return[get_class($this) . '_AstAccountCallerID'] = array('' . _('Caller ID') . '' . $this->attributes['AstAccountCallerID'][0] . ''); - $return[get_class($this) . '_AstAccountContext'] = array('' . _('Account context') . '' . $this->attributes['AstAccountContext'][0] . ''); - $return[get_class($this) . '_AstAccountHost'] = array('' . _('Host') . '' . $this->attributes['AstAccountHost'][0] . ''); - $return[get_class($this) . '_AstAccountType'] = array('' . _('Account type') . '' . $this->attributes['AstAccountType'][0] . ''); - $AstAccountUserAgent = ''; - if (isset($this->attributes['AstAccountUserAgent'][0])) $AstAccountUserAgent = $this->attributes['AstAccountUserAgent'][0]; - $return[get_class($this) . '_AstAccountUserAgent'] = array('' . _('User agent') . '' . $AstAccountUserAgent . ''); - $AstAccountAMAFlags = ''; - if (isset($this->attributes['AstAccountAMAFlags'][0])) $AstAccountAMAFlags = $this->attributes['AstAccountAMAFlags'][0]; - $return[get_class($this) . '_AstAccountAMAFlags'] = array('' . _('AMA flags') . '' . $AstAccountAMAFlags . ''); - $AstAccountCallGroup = ''; - if (isset($this->attributes['AstAccountCallGroup'][0])) $AstAccountCallGroup = $this->attributes['AstAccountCallGroup'][0]; - $return[get_class($this) . '_AstAccountCallGroup'] = array('' . _('Call groups') . '' . $AstAccountCallGroup . ''); - $AstAccountDTMFMode = ''; - if (isset($this->attributes['AstAccountDTMFMode'][0])) $AstAccountDTMFMode = $this->attributes['AstAccountDTMFMode'][0]; - $return[get_class($this) . '_AstAccountDTMFMode'] = array('' . _('DTMF mode') . '' . $AstAccountDTMFMode . ''); - $AstAccountFromUser = ''; - if (isset($this->attributes['AstAccountFromUser'][0])) $AstAccountFromUser = $this->attributes['AstAccountFromUser'][0]; - $return[get_class($this) . '_AstAccountFromUser'] = array('' . _('From user') . '' . $AstAccountFromUser . ''); - $AstAccountFromDomain = ''; - if (isset($this->attributes['AstAccountFromDomain'][0])) $AstAccountFromDomain = $this->attributes['AstAccountFromDomain'][0]; - $return[get_class($this) . '_AstAccountFromDomain'] = array('' . _('From domain') . '' . $AstAccountFromDomain . ''); - $AstAccountFullContact = ''; - if (isset($this->attributes['AstAccountFullContact'][0])) $AstAccountFullContact = $this->attributes['AstAccountFullContact'][0]; - $return[get_class($this) . '_AstAccountFullContact'] = array('' . _('Full contact') . '' . $AstAccountFullContact . ''); - $AstAccountInsecure = ''; - if (isset($this->attributes['AstAccountInsecure'][0])) $AstAccountInsecure = $this->attributes['AstAccountInsecure'][0]; - $return[get_class($this) . '_AstAccountInsecure'] = array('' . _('Insecure') . '' . $AstAccountInsecure . ''); - $AstAccountMailbox = ''; - if (isset($this->attributes['AstAccountMailbox'][0])) $AstAccountMailbox = $this->attributes['AstAccountMailbox'][0]; - $return[get_class($this) . '_AstAccountMailbox'] = array('' . _('Mailbox') . '' . $AstAccountMailbox . ''); - $AstAccountNAT = ''; - if (isset($this->attributes['AstAccountNAT'][0])) $AstAccountNAT = $this->attributes['AstAccountNAT'][0]; - $return[get_class($this) . '_AstAccountNAT'] = array('' . _('NAT') . '' . $AstAccountNAT . ''); - $AstAccountDeny = ''; - if (isset($this->attributes['AstAccountDeny'][0])) $AstAccountDeny = $this->attributes['AstAccountDeny'][0]; - $return[get_class($this) . '_AstAccountDeny'] = array('' . _('Deny') . '' . $AstAccountDeny . ''); - $AstAccountPermit = ''; - if (isset($this->attributes['AstAccountPermit'][0])) $AstAccountPermit = $this->attributes['AstAccountPermit'][0]; - $return[get_class($this) . '_AstAccountPermit'] = array('' . _('Permit') . '' . $AstAccountPermit . ''); - $AstAccountPickupGroup = ''; - if (isset($this->attributes['AstAccountPickupGroup'][0])) $AstAccountPickupGroup = $this->attributes['AstAccountPickupGroup'][0]; - $return[get_class($this) . '_AstAccountPickupGroup'] = array('' . _('Pickup group') . '' . $AstAccountPickupGroup . ''); - $AstAccountPort = ''; - if (isset($this->attributes['AstAccountPort'][0])) $AstAccountPort = $this->attributes['AstAccountPort'][0]; - $return[get_class($this) . '_AstAccountPort'] = array('' . _('Port') . '' . $AstAccountPort . ''); - $AstAccountQualify = ''; - if (isset($this->attributes['AstAccountQualify'][0])) $AstAccountQualify = $this->attributes['AstAccountQualify'][0]; - $return[get_class($this) . '_AstAccountQualify'] = array('' . _('Qualify') . '' . $AstAccountQualify . ''); - $AstAccountRestrictCID = ''; - if (isset($this->attributes['AstAccountRestrictCID'][0])) $AstAccountRestrictCID = $this->attributes['AstAccountRestrictCID'][0]; - $return[get_class($this) . '_AstAccountRestrictCID'] = array('' . _('Restrict caller ID') . '' . $AstAccountRestrictCID . ''); - $AstAccountRTPTimeout = ''; - if (isset($this->attributes['AstAccountRTPTimeout'][0])) $AstAccountRTPTimeout = $this->attributes['AstAccountRTPTimeout'][0]; - $return[get_class($this) . '_AstAccountRTPTimeout'] = array('' . _('RTP timeout') . '' . $AstAccountRTPTimeout . ''); - $AstAccountRTPHoldTimeout = ''; - if (isset($this->attributes['AstAccountRTPHoldTimeout'][0])) $AstAccountRTPHoldTimeout = $this->attributes['AstAccountRTPHoldTimeout'][0]; - $return[get_class($this) . '_AstAccountRTPHoldTimeout'] = array('' . _('RTP hold timeout') . '' . $AstAccountRTPHoldTimeout . ''); - $AstAccountDisallowedCodec = ''; - if (isset($this->attributes['AstAccountDisallowedCodec'][0])) $AstAccountDisallowedCodec = implode('; ', $this->attributes['AstAccountDisallowedCodec']); - $return[get_class($this) . '_AstAccountDisallowedCodec'] = array('' . _('Disallowed codec') . '' . $AstAccountDisallowedCodec . ''); - $AstAccountAllowedCodec = ''; - if (isset($this->attributes['AstAccountAllowedCodec'][0])) $AstAccountAllowedCodec = implode('; ', $this->attributes['AstAccountAllowedCodec']); - $return[get_class($this) . '_AstAccountAllowedCodec'] = array('' . _('Allowed codec') . '' . $AstAccountAllowedCodec . ''); - $AstAccountMusicOnHold = ''; - if (isset($this->attributes['AstAccountMusicOnHold'][0])) $AstAccountMusicOnHold = $this->attributes['AstAccountMusicOnHold'][0]; - $return[get_class($this) . '_AstAccountMusicOnHold'] = array('' . _('Music on hold') . '' . $AstAccountMusicOnHold . ''); - $AstAccountExpirationTimestamp = ''; - if (isset($this->attributes['AstAccountExpirationTimestamp'][0])) $AstAccountExpirationTimestamp = $this->attributes['AstAccountExpirationTimestamp'][0]; - $return[get_class($this) . '_AstAccountExpirationTimestamp'] = array('' . _('Expiration timestamp') . '' . $AstAccountExpirationTimestamp . ''); - $AstAccountRegistrationContext = ''; - if (isset($this->attributes['AstAccountRegistrationContext'][0])) $AstAccountRegistrationContext = $this->attributes['AstAccountRegistrationContext'][0]; - $return[get_class($this) . '_AstAccountRegistrationContext'] = array('' . _('Registration context') . '' . $AstAccountRegistrationContext . ''); - $AstAccountRegistrationExten = ''; - if (isset($this->attributes['AstAccountRegistrationExten'][0])) $AstAccountRegistrationExten = $this->attributes['AstAccountRegistrationExten'][0]; - $return[get_class($this) . '_AstAccountRegistrationExten'] = array('' . _('Registration extension') . '' . $AstAccountRegistrationExten . ''); - $AstAccountCanCallForward = ''; - if (isset($this->attributes['AstAccountCanCallForward'][0])) $AstAccountCanCallForward = $this->attributes['AstAccountCanCallForward'][0]; - $return[get_class($this) . '_AstAccountCanCallForward'] = array('' . _('Can call forward') . '' . $AstAccountCanCallForward . ''); - $AstAccountIPAddress = ''; - if (isset($this->attributes['AstAccountIPAddress'][0])) $AstAccountIPAddress = $this->attributes['AstAccountIPAddress'][0]; - $return[get_class($this) . '_AstAccountIPAddress'] = array('' . _('IP address') . '' . $AstAccountIPAddress . ''); - $AstAccountDefaultUser = ''; - if (isset($this->attributes['AstAccountDefaultUser'][0])) $AstAccountDefaultUser = $this->attributes['AstAccountDefaultUser'][0]; - $return[get_class($this) . '_AstAccountDefaultUser'] = array('' . _('Default user') . '' . $AstAccountDefaultUser . ''); - $AstAccountRegistrationServer = ''; - if (isset($this->attributes['AstAccountRegistrationServer'][0])) $AstAccountRegistrationServer = $this->attributes['AstAccountRegistrationServer'][0]; - $return[get_class($this) . '_AstAccountRegistrationServer'] = array('' . _('Registration server') . '' . $AstAccountRegistrationServer . ''); - $AstAccountLastQualifyMilliseconds = ''; - if (isset($this->attributes['AstAccountLastQualifyMilliseconds'][0])) $AstAccountLastQualifyMilliseconds = $this->attributes['AstAccountLastQualifyMilliseconds'][0]; - $return[get_class($this) . '_AstAccountLastQualifyMilliseconds'] = array('' . _('Last qualify milliseconds') . '' . $AstAccountLastQualifyMilliseconds . ''); + $this->addSimplePDFField($return, 'AstAccountCallerID', _('Caller ID')); + $this->addSimplePDFField($return, 'AstAccountContext', _('Account context')); + $this->addSimplePDFField($return, 'AstAccountHost', _('Host')); + $this->addSimplePDFField($return, 'AstAccountType', _('Account type')); + $this->addSimplePDFField($return, 'AstAccountUserAgent', _('User agent')); + $this->addSimplePDFField($return, 'AstAccountAMAFlags', _('AMA flags')); + $this->addSimplePDFField($return, 'AstAccountCallGroup', _('Call groups')); + $this->addSimplePDFField($return, 'AstAccountDTMFMode', _('DTMF mode')); + $this->addSimplePDFField($return, 'AstAccountFromUser', _('From user')); + $this->addSimplePDFField($return, 'AstAccountFromDomain', _('From domain')); + $this->addSimplePDFField($return, 'AstAccountFullContact', _('Full contact')); + $this->addSimplePDFField($return, 'AstAccountInsecure', _('Insecure')); + $this->addSimplePDFField($return, 'AstAccountMailbox', _('Mailbox')); + $this->addSimplePDFField($return, 'AstAccountNAT', _('NAT')); + $this->addSimplePDFField($return, 'AstAccountDeny', _('Deny')); + $this->addSimplePDFField($return, 'AstAccountPermit', _('Permit')); + $this->addSimplePDFField($return, 'AstAccountPickupGroup', _('Pickup group')); + $this->addSimplePDFField($return, 'AstAccountPort', _('Port')); + $this->addSimplePDFField($return, 'AstAccountQualify', _('Qualify')); + $this->addSimplePDFField($return, 'AstAccountRestrictCID', _('Restrict caller ID')); + $this->addSimplePDFField($return, 'AstAccountRTPTimeout', _('RTP timeout')); + $this->addSimplePDFField($return, 'AstAccountRTPHoldTimeout', _('RTP hold timeout')); + $this->addSimplePDFField($return, 'AstAccountDisallowedCodec', _('Disallowed codec')); + $this->addSimplePDFField($return, 'AstAccountAllowedCodec', _('Allowed codec')); + $this->addSimplePDFField($return, 'AstAccountMusicOnHold', _('Music on hold')); + $this->addSimplePDFField($return, 'AstAccountExpirationTimestamp', _('Expiration timestamp')); + $this->addSimplePDFField($return, 'AstAccountRegistrationContext', _('Registration context')); + $this->addSimplePDFField($return, 'AstAccountRegistrationExten', _('Registration extension')); + $this->addSimplePDFField($return, 'AstAccountCanCallForward', _('Can call forward')); + $this->addSimplePDFField($return, 'AstAccountIPAddress', _('IP address')); + $this->addSimplePDFField($return, 'AstAccountDefaultUser', _('Default user')); + $this->addSimplePDFField($return, 'AstAccountRegistrationServer', _('Registration server')); + $this->addSimplePDFField($return, 'AstAccountLastQualifyMilliseconds', _('Last qualify milliseconds')); return $return; } diff --git a/lam/lib/modules/asteriskExtension.inc b/lam/lib/modules/asteriskExtension.inc index c6f7b9b1..f201edb7 100644 --- a/lam/lib/modules/asteriskExtension.inc +++ b/lam/lib/modules/asteriskExtension.inc @@ -802,15 +802,9 @@ class asteriskExtension extends baseModule { $extName = $this->extensionRows[0]['astextension'][0]; } // global values - if (isset($this->attributes['AstContext'])) { - $return[get_class($this) . '_AstContext'] = array('' . _('Account context') . '' . $this->attributes['AstContext'][0] . ''); - } - if (isset($this->attributes['AstExtension'])) { - $return[get_class($this) . '_AstExtension'] = array('' . _('Extension name') . '' . $this->attributes['AstExtension'][0] . ''); - } - if (isset($this->attributes['member'])) { - $return[get_class($this) . '_owners'] = array('' . _('Extension owners') . '' . implode('; ', $this->attributes['member']) . ''); - } + $this->addSimplePDFField($return, 'AstContext', _('Account context')); + $this->addSimplePDFField($return, 'AstExtension', _('Extension name')); + $this->addSimplePDFField($return, 'owners', _('Extension owners'), 'member', '; '); // rules $entries = $this->load_extension_parts($extName); $rulePDF = array(); diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index 9386c4c5..7a4fc084 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) Copyright (C) 2010 Pavel Pozdnyak - 2010 - 2012 Roland Gruber + 2010 - 2013 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 @@ -385,33 +385,13 @@ class asteriskVoicemail extends baseModule implements passwordService { */ function get_pdfEntries() { $return = array(); - $AstVoicemailMailbox = ''; - if (isset($this->attributes['AstVoicemailMailbox'][0])) $AstVoicemailMailbox = $this->attributes['AstVoicemailMailbox'][0]; - $return[get_class($this) . '_AstVoicemailMailbox'] = array('' . _('Mailbox') . '' . $AstVoicemailMailbox . ''); - - $AstContext = ''; - if (isset($this->attributes['AstContext'][0])) $AstContext = $this->attributes['AstContext'][0]; - $return[get_class($this) . '_AstContext'] = array('' . _('Account context') . '' . $AstContext . ''); - - $AstVoicemailFullname = ''; - if (isset($this->attributes['AstVoicemailFullname'][0])) $AstVoicemailFullname = $this->attributes['AstVoicemailFullname'][0]; - $return[get_class($this) . '_AstVoicemailFullname'] = array('' . _('Full name') . '' . $AstVoicemailFullname . ''); - - $AstVoicemailContext = ''; - if (isset($this->attributes['AstVoicemailContext'][0])) $AstVoicemailContext = $this->attributes['AstVoicemailContext'][0]; - $return[get_class($this) . '_AstVoicemailContext'] = array('' . _('Voicemail context') . '' . $AstVoicemailContext . ''); - - $AstVoicemailPager = ''; - if (isset($this->attributes['AstVoicemailPager'][0])) $AstVoicemailPager = $this->attributes['AstVoicemailPager'][0]; - $return[get_class($this) . '_AstVoicemailPager'] = array('' . _('Pager') . '' . $AstVoicemailPager . ''); - - $AstVoicemailEmail = ''; - if (isset($this->attributes['AstVoicemailEmail'][0])) $AstVoicemailEmail = $this->attributes['AstVoicemailEmail'][0]; - $return[get_class($this) . '_AstVoicemailEmail'] = array('' . _('Email address') . '' . $AstVoicemailEmail . ''); - - $AstVoicemailOptions = ''; - if (isset($this->attributes['AstVoicemailOptions'][0])) $AstVoicemailOptions = $this->attributes['AstVoicemailOptions'][0]; - $return[get_class($this) . '_AstVoicemailOptions'] = array('' . _('Options') . '' . $AstVoicemailOptions . ''); + $this->addSimplePDFField($return, 'AstVoicemailMailbox', _('Mailbox')); + $this->addSimplePDFField($return, 'AstContext', _('Account context')); + $this->addSimplePDFField($return, 'AstVoicemailFullname', _('Full name')); + $this->addSimplePDFField($return, 'AstVoicemailContext', _('Voicemail context')); + $this->addSimplePDFField($return, 'AstVoicemailPager', _('Pager')); + $this->addSimplePDFField($return, 'AstVoicemailEmail', _('Email address')); + $this->addSimplePDFField($return, 'AstVoicemailOptions', _('Options')); return $return; } diff --git a/lam/lib/modules/authorizedServiceObject.inc b/lam/lib/modules/authorizedServiceObject.inc index 941db0a4..d4826522 100644 --- a/lam/lib/modules/authorizedServiceObject.inc +++ b/lam/lib/modules/authorizedServiceObject.inc @@ -3,8 +3,8 @@ $Id$ This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2011 J de Jong - 2012 Roland Gruber + Copyright (C) 2011 J de Jong + 2012 - 2013 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 @@ -289,7 +289,7 @@ class authorizedServiceObject extends baseModule { function get_pdfEntries() { $return = array(); if (in_array('authorizedServiceObject', $this->attributes['objectClass'])) { - $return['authorizedServiceObject_authorizedService'][0] = '' . _('Authorized Services') . '' . implode(', ', $this->attributes['authorizedService']) . ''; + $this->addSimplePDFField($return, 'authorizedService', _('Authorized Services')); } return $return; } diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index a367ca2f..cf895216 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -626,8 +626,7 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I if (isset($this->all_netbios_node_types[$nodeType])) { $nodeTypeValue = $this->all_netbios_node_types[$nodeType]; } - return array( - get_class($this) . '_subnet' => array('' . _('Subnet') . '' . $this->attributes['cn'][0] . ''), + $return = array( get_class($this) . '_domainName' => array('' . _('Domain name') . '' . $this->getDHCPOption('domain-name') . ''), get_class($this) . '_leaseTime' => array('' . _('Lease time') . '' . $this->getDefaultLeaseTime() . ''), get_class($this) . '_maxLeaseTime' => array('' . _('Maximum lease time') . '' . $this->getMaxLeaseTime() . ''), @@ -636,9 +635,11 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I get_class($this) . '_netbiosServer' => array('' . _('Netbios name servers') . '' . $this->getDHCPOption('netbios-name-servers') . ''), get_class($this) . '_netbiosType' => array('' . _('Netbios node type') . '' . $nodeTypeValue . ''), get_class($this) . '_subnetMask' => array('' . _('Subnet mask') . '' . $this->getDHCPOption('subnet-mask') . ''), - get_class($this) . '_netMask' => array('' . _('Net mask') . '' . $this->attributes['dhcpNetMask'][0] . ''), - get_class($this) . '_description' => array('' . _('Description') . '' . $this->attributes['dhcpComments'][0] . ''), ); + $this->addSimplePDFField($return, 'description', _('Description'), 'dhcpComments'); + $this->addSimplePDFField($return, 'subnet', _('Subnet'), 'cn'); + $this->addSimplePDFField($return, 'netMask', _('Net mask'), 'dhcpNetMask'); + return $return; } /** diff --git a/lam/lib/modules/eduPerson.inc b/lam/lib/modules/eduPerson.inc index ebb597b2..9ce77941 100644 --- a/lam/lib/modules/eduPerson.inc +++ b/lam/lib/modules/eduPerson.inc @@ -763,40 +763,16 @@ class eduPerson extends baseModule { */ function get_pdfEntries() { $return = array(); - if (isset($this->attributes['eduPersonPrimaryAffiliation'][0])) { - $return['eduPerson_primaryAffiliation'][0] = '' . _('Primary affiliation') . '' . $this->attributes['eduPersonPrimaryAffiliation'][0] . ''; - } - if (isset($this->attributes['eduPersonScopedAffiliation'][0])) { - $return['eduPerson_scopedAffiliation'][0] = '' . _('Scoped affiliations') . '' . implode(', ', $this->attributes['eduPersonScopedAffiliation']) . ''; - } - if (isset($this->attributes['eduPersonPrincipalName'][0])) { - $return['eduPerson_principalName'][0] = '' . _('Principal name') . '' . $this->attributes['eduPersonPrincipalName'][0] . ''; - } - if (isset($this->attributes['eduPersonNickname'][0])) { - sort($this->attributes['eduPersonNickname']); - $return['eduPerson_nickname'][0] = '' . _('Nick names') . '' . implode(', ', $this->attributes['eduPersonNickname']) . ''; - } - if (isset($this->attributes['eduPersonAffiliation'][0])) { - sort($this->attributes['eduPersonAffiliation']); - $return['eduPerson_affiliation'][0] = '' . _('Affiliations') . '' . implode(', ', $this->attributes['eduPersonAffiliation']) . ''; - } - if (isset($this->attributes['eduPersonEntitlement'][0])) { - sort($this->attributes['eduPersonEntitlement']); - $return['eduPerson_entitlement'][0] = '' . _('Entitlements') . '' . implode(', ', $this->attributes['eduPersonEntitlement']) . ''; - } - if (isset($this->attributes['eduPersonOrgDN'][0])) { - $return['eduPerson_orgDN'][0] = '' . _('Organisation') . '' . $this->attributes['eduPersonOrgDN'][0] . ''; - } - if (isset($this->attributes['eduPersonPrimaryOrgUnitDN'][0])) { - $return['eduPerson_primaryOrgUnitDN'][0] = '' . _('Primary organisational unit') . '' . $this->attributes['eduPersonPrimaryOrgUnitDN'][0] . ''; - } - if (isset($this->attributes['eduPersonOrgUnitDN'][0])) { - $return['eduPerson_orgUnitDN'][0] = '' . _('Organisational units') . '' . implode(', ', $this->attributes['eduPersonOrgUnitDN']) . ''; - } - if (isset($this->attributes['eduPersonAssurance'][0])) { - sort($this->attributes['eduPersonAssurance']); - $return['eduPerson_eduPersonAssurance'][0] = '' . _('Assurance profiles') . '' . implode(', ', $this->attributes['eduPersonAssurance']) . ''; - } + $this->addSimplePDFField($return, 'primaryAffiliation', _('Primary affiliation'), 'eduPersonPrimaryAffiliation'); + $this->addSimplePDFField($return, 'scopedAffiliation', _('Scoped affiliations'), 'eduPersonScopedAffiliation'); + $this->addSimplePDFField($return, 'principalName', _('Principal name'), 'eduPersonPrincipalName'); + $this->addSimplePDFField($return, 'nickname', _('Nick names'), 'eduPersonNickname'); + $this->addSimplePDFField($return, 'affiliation', _('Affiliations'), 'eduPersonAffiliation'); + $this->addSimplePDFField($return, 'entitlement', _('Entitlements'), 'eduPersonEntitlement'); + $this->addSimplePDFField($return, 'orgDN', _('Organisation'), 'eduPersonOrgDN'); + $this->addSimplePDFField($return, 'primaryOrgUnitDN', _('Primary organisational unit'), 'eduPersonPrimaryOrgUnitDN'); + $this->addSimplePDFField($return, 'orgUnitDN', _('Organisational units'), 'eduPersonOrgUnitDN'); + $this->addSimplePDFField($return, 'eduPersonAssurance', _('Assurance profiles'), 'eduPersonAssurance'); return $return; } diff --git a/lam/lib/modules/range.inc b/lam/lib/modules/range.inc index 74e36f5f..6a8eff60 100644 --- a/lam/lib/modules/range.inc +++ b/lam/lib/modules/range.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2008 - 2010 Roland Gruber + 2008 - 2013 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 @@ -221,7 +221,7 @@ class range extends baseModule { // Load DHCP Options: - if (is_array($attr['dhcpRange'])) { + if (isset($attr['dhcpRange']) && is_array($attr['dhcpRange'])) { foreach($attr['dhcpRange'] AS $id=>$value) { $ex = explode(" ", $value); diff --git a/lam/lib/types/asteriskExt.inc b/lam/lib/types/asteriskExt.inc index b2a51add..935cf2e9 100644 --- a/lam/lib/types/asteriskExt.inc +++ b/lam/lib/types/asteriskExt.inc @@ -196,7 +196,7 @@ class lamAsteriskExtList extends lamList { unset($entries[$key]); } } - return $entries; + return array_values($entries); } } diff --git a/lam/lib/types/dhcp.inc b/lam/lib/types/dhcp.inc index ceda9925..1a862bbf 100644 --- a/lam/lib/types/dhcp.inc +++ b/lam/lib/types/dhcp.inc @@ -250,12 +250,17 @@ class lamDHCPList extends lamList { /** * Manages all POST actions (e.g. button pressed) for the account lists. + * + * @return String HTML fragment to insert into beginning of account list */ function listDoPost() { - parent::listDoPost(); + $fragment = parent::listDoPost(); if (isset($_POST['dhcpDefaults'])) { metaRefresh("../account/edit.php?type=dhcp&DN='".$_SESSION['config']->get_suffix('dhcp')."'"); } + else { + return $fragment; + } } } ?> \ No newline at end of file