reduced PDF code

This commit is contained in:
Roland Gruber 2013-05-05 13:50:19 +00:00
parent 4230f78268
commit 1abec30bcd
9 changed files with 72 additions and 174 deletions

View File

@ -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('<block><key>' . _('Caller ID') . '</key><value>' . $this->attributes['AstAccountCallerID'][0] . '</value></block>');
$return[get_class($this) . '_AstAccountContext'] = array('<block><key>' . _('Account context') . '</key><value>' . $this->attributes['AstAccountContext'][0] . '</value></block>');
$return[get_class($this) . '_AstAccountHost'] = array('<block><key>' . _('Host') . '</key><value>' . $this->attributes['AstAccountHost'][0] . '</value></block>');
$return[get_class($this) . '_AstAccountType'] = array('<block><key>' . _('Account type') . '</key><value>' . $this->attributes['AstAccountType'][0] . '</value></block>');
$AstAccountUserAgent = '';
if (isset($this->attributes['AstAccountUserAgent'][0])) $AstAccountUserAgent = $this->attributes['AstAccountUserAgent'][0];
$return[get_class($this) . '_AstAccountUserAgent'] = array('<block><key>' . _('User agent') . '</key><value>' . $AstAccountUserAgent . '</value></block>');
$AstAccountAMAFlags = '';
if (isset($this->attributes['AstAccountAMAFlags'][0])) $AstAccountAMAFlags = $this->attributes['AstAccountAMAFlags'][0];
$return[get_class($this) . '_AstAccountAMAFlags'] = array('<block><key>' . _('AMA flags') . '</key><value>' . $AstAccountAMAFlags . '</value></block>');
$AstAccountCallGroup = '';
if (isset($this->attributes['AstAccountCallGroup'][0])) $AstAccountCallGroup = $this->attributes['AstAccountCallGroup'][0];
$return[get_class($this) . '_AstAccountCallGroup'] = array('<block><key>' . _('Call groups') . '</key><value>' . $AstAccountCallGroup . '</value></block>');
$AstAccountDTMFMode = '';
if (isset($this->attributes['AstAccountDTMFMode'][0])) $AstAccountDTMFMode = $this->attributes['AstAccountDTMFMode'][0];
$return[get_class($this) . '_AstAccountDTMFMode'] = array('<block><key>' . _('DTMF mode') . '</key><value>' . $AstAccountDTMFMode . '</value></block>');
$AstAccountFromUser = '';
if (isset($this->attributes['AstAccountFromUser'][0])) $AstAccountFromUser = $this->attributes['AstAccountFromUser'][0];
$return[get_class($this) . '_AstAccountFromUser'] = array('<block><key>' . _('From user') . '</key><value>' . $AstAccountFromUser . '</value></block>');
$AstAccountFromDomain = '';
if (isset($this->attributes['AstAccountFromDomain'][0])) $AstAccountFromDomain = $this->attributes['AstAccountFromDomain'][0];
$return[get_class($this) . '_AstAccountFromDomain'] = array('<block><key>' . _('From domain') . '</key><value>' . $AstAccountFromDomain . '</value></block>');
$AstAccountFullContact = '';
if (isset($this->attributes['AstAccountFullContact'][0])) $AstAccountFullContact = $this->attributes['AstAccountFullContact'][0];
$return[get_class($this) . '_AstAccountFullContact'] = array('<block><key>' . _('Full contact') . '</key><value>' . $AstAccountFullContact . '</value></block>');
$AstAccountInsecure = '';
if (isset($this->attributes['AstAccountInsecure'][0])) $AstAccountInsecure = $this->attributes['AstAccountInsecure'][0];
$return[get_class($this) . '_AstAccountInsecure'] = array('<block><key>' . _('Insecure') . '</key><value>' . $AstAccountInsecure . '</value></block>');
$AstAccountMailbox = '';
if (isset($this->attributes['AstAccountMailbox'][0])) $AstAccountMailbox = $this->attributes['AstAccountMailbox'][0];
$return[get_class($this) . '_AstAccountMailbox'] = array('<block><key>' . _('Mailbox') . '</key><value>' . $AstAccountMailbox . '</value></block>');
$AstAccountNAT = '';
if (isset($this->attributes['AstAccountNAT'][0])) $AstAccountNAT = $this->attributes['AstAccountNAT'][0];
$return[get_class($this) . '_AstAccountNAT'] = array('<block><key>' . _('NAT') . '</key><value>' . $AstAccountNAT . '</value></block>');
$AstAccountDeny = '';
if (isset($this->attributes['AstAccountDeny'][0])) $AstAccountDeny = $this->attributes['AstAccountDeny'][0];
$return[get_class($this) . '_AstAccountDeny'] = array('<block><key>' . _('Deny') . '</key><value>' . $AstAccountDeny . '</value></block>');
$AstAccountPermit = '';
if (isset($this->attributes['AstAccountPermit'][0])) $AstAccountPermit = $this->attributes['AstAccountPermit'][0];
$return[get_class($this) . '_AstAccountPermit'] = array('<block><key>' . _('Permit') . '</key><value>' . $AstAccountPermit . '</value></block>');
$AstAccountPickupGroup = '';
if (isset($this->attributes['AstAccountPickupGroup'][0])) $AstAccountPickupGroup = $this->attributes['AstAccountPickupGroup'][0];
$return[get_class($this) . '_AstAccountPickupGroup'] = array('<block><key>' . _('Pickup group') . '</key><value>' . $AstAccountPickupGroup . '</value></block>');
$AstAccountPort = '';
if (isset($this->attributes['AstAccountPort'][0])) $AstAccountPort = $this->attributes['AstAccountPort'][0];
$return[get_class($this) . '_AstAccountPort'] = array('<block><key>' . _('Port') . '</key><value>' . $AstAccountPort . '</value></block>');
$AstAccountQualify = '';
if (isset($this->attributes['AstAccountQualify'][0])) $AstAccountQualify = $this->attributes['AstAccountQualify'][0];
$return[get_class($this) . '_AstAccountQualify'] = array('<block><key>' . _('Qualify') . '</key><value>' . $AstAccountQualify . '</value></block>');
$AstAccountRestrictCID = '';
if (isset($this->attributes['AstAccountRestrictCID'][0])) $AstAccountRestrictCID = $this->attributes['AstAccountRestrictCID'][0];
$return[get_class($this) . '_AstAccountRestrictCID'] = array('<block><key>' . _('Restrict caller ID') . '</key><value>' . $AstAccountRestrictCID . '</value></block>');
$AstAccountRTPTimeout = '';
if (isset($this->attributes['AstAccountRTPTimeout'][0])) $AstAccountRTPTimeout = $this->attributes['AstAccountRTPTimeout'][0];
$return[get_class($this) . '_AstAccountRTPTimeout'] = array('<block><key>' . _('RTP timeout') . '</key><value>' . $AstAccountRTPTimeout . '</value></block>');
$AstAccountRTPHoldTimeout = '';
if (isset($this->attributes['AstAccountRTPHoldTimeout'][0])) $AstAccountRTPHoldTimeout = $this->attributes['AstAccountRTPHoldTimeout'][0];
$return[get_class($this) . '_AstAccountRTPHoldTimeout'] = array('<block><key>' . _('RTP hold timeout') . '</key><value>' . $AstAccountRTPHoldTimeout . '</value></block>');
$AstAccountDisallowedCodec = '';
if (isset($this->attributes['AstAccountDisallowedCodec'][0])) $AstAccountDisallowedCodec = implode('; ', $this->attributes['AstAccountDisallowedCodec']);
$return[get_class($this) . '_AstAccountDisallowedCodec'] = array('<block><key>' . _('Disallowed codec') . '</key><value>' . $AstAccountDisallowedCodec . '</value></block>');
$AstAccountAllowedCodec = '';
if (isset($this->attributes['AstAccountAllowedCodec'][0])) $AstAccountAllowedCodec = implode('; ', $this->attributes['AstAccountAllowedCodec']);
$return[get_class($this) . '_AstAccountAllowedCodec'] = array('<block><key>' . _('Allowed codec') . '</key><value>' . $AstAccountAllowedCodec . '</value></block>');
$AstAccountMusicOnHold = '';
if (isset($this->attributes['AstAccountMusicOnHold'][0])) $AstAccountMusicOnHold = $this->attributes['AstAccountMusicOnHold'][0];
$return[get_class($this) . '_AstAccountMusicOnHold'] = array('<block><key>' . _('Music on hold') . '</key><value>' . $AstAccountMusicOnHold . '</value></block>');
$AstAccountExpirationTimestamp = '';
if (isset($this->attributes['AstAccountExpirationTimestamp'][0])) $AstAccountExpirationTimestamp = $this->attributes['AstAccountExpirationTimestamp'][0];
$return[get_class($this) . '_AstAccountExpirationTimestamp'] = array('<block><key>' . _('Expiration timestamp') . '</key><value>' . $AstAccountExpirationTimestamp . '</value></block>');
$AstAccountRegistrationContext = '';
if (isset($this->attributes['AstAccountRegistrationContext'][0])) $AstAccountRegistrationContext = $this->attributes['AstAccountRegistrationContext'][0];
$return[get_class($this) . '_AstAccountRegistrationContext'] = array('<block><key>' . _('Registration context') . '</key><value>' . $AstAccountRegistrationContext . '</value></block>');
$AstAccountRegistrationExten = '';
if (isset($this->attributes['AstAccountRegistrationExten'][0])) $AstAccountRegistrationExten = $this->attributes['AstAccountRegistrationExten'][0];
$return[get_class($this) . '_AstAccountRegistrationExten'] = array('<block><key>' . _('Registration extension') . '</key><value>' . $AstAccountRegistrationExten . '</value></block>');
$AstAccountCanCallForward = '';
if (isset($this->attributes['AstAccountCanCallForward'][0])) $AstAccountCanCallForward = $this->attributes['AstAccountCanCallForward'][0];
$return[get_class($this) . '_AstAccountCanCallForward'] = array('<block><key>' . _('Can call forward') . '</key><value>' . $AstAccountCanCallForward . '</value></block>');
$AstAccountIPAddress = '';
if (isset($this->attributes['AstAccountIPAddress'][0])) $AstAccountIPAddress = $this->attributes['AstAccountIPAddress'][0];
$return[get_class($this) . '_AstAccountIPAddress'] = array('<block><key>' . _('IP address') . '</key><value>' . $AstAccountIPAddress . '</value></block>');
$AstAccountDefaultUser = '';
if (isset($this->attributes['AstAccountDefaultUser'][0])) $AstAccountDefaultUser = $this->attributes['AstAccountDefaultUser'][0];
$return[get_class($this) . '_AstAccountDefaultUser'] = array('<block><key>' . _('Default user') . '</key><value>' . $AstAccountDefaultUser . '</value></block>');
$AstAccountRegistrationServer = '';
if (isset($this->attributes['AstAccountRegistrationServer'][0])) $AstAccountRegistrationServer = $this->attributes['AstAccountRegistrationServer'][0];
$return[get_class($this) . '_AstAccountRegistrationServer'] = array('<block><key>' . _('Registration server') . '</key><value>' . $AstAccountRegistrationServer . '</value></block>');
$AstAccountLastQualifyMilliseconds = '';
if (isset($this->attributes['AstAccountLastQualifyMilliseconds'][0])) $AstAccountLastQualifyMilliseconds = $this->attributes['AstAccountLastQualifyMilliseconds'][0];
$return[get_class($this) . '_AstAccountLastQualifyMilliseconds'] = array('<block><key>' . _('Last qualify milliseconds') . '</key><value>' . $AstAccountLastQualifyMilliseconds . '</value></block>');
$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;
}

View File

@ -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('<block><key>' . _('Account context') . '</key><value>' . $this->attributes['AstContext'][0] . '</value></block>');
}
if (isset($this->attributes['AstExtension'])) {
$return[get_class($this) . '_AstExtension'] = array('<block><key>' . _('Extension name') . '</key><value>' . $this->attributes['AstExtension'][0] . '</value></block>');
}
if (isset($this->attributes['member'])) {
$return[get_class($this) . '_owners'] = array('<block><key>' . _('Extension owners') . '</key><value>' . implode('; ', $this->attributes['member']) . '</value></block>');
}
$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();

View File

@ -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('<block><key>' . _('Mailbox') . '</key><value>' . $AstVoicemailMailbox . '</value></block>');
$AstContext = '';
if (isset($this->attributes['AstContext'][0])) $AstContext = $this->attributes['AstContext'][0];
$return[get_class($this) . '_AstContext'] = array('<block><key>' . _('Account context') . '</key><value>' . $AstContext . '</value></block>');
$AstVoicemailFullname = '';
if (isset($this->attributes['AstVoicemailFullname'][0])) $AstVoicemailFullname = $this->attributes['AstVoicemailFullname'][0];
$return[get_class($this) . '_AstVoicemailFullname'] = array('<block><key>' . _('Full name') . '</key><value>' . $AstVoicemailFullname . '</value></block>');
$AstVoicemailContext = '';
if (isset($this->attributes['AstVoicemailContext'][0])) $AstVoicemailContext = $this->attributes['AstVoicemailContext'][0];
$return[get_class($this) . '_AstVoicemailContext'] = array('<block><key>' . _('Voicemail context') . '</key><value>' . $AstVoicemailContext . '</value></block>');
$AstVoicemailPager = '';
if (isset($this->attributes['AstVoicemailPager'][0])) $AstVoicemailPager = $this->attributes['AstVoicemailPager'][0];
$return[get_class($this) . '_AstVoicemailPager'] = array('<block><key>' . _('Pager') . '</key><value>' . $AstVoicemailPager . '</value></block>');
$AstVoicemailEmail = '';
if (isset($this->attributes['AstVoicemailEmail'][0])) $AstVoicemailEmail = $this->attributes['AstVoicemailEmail'][0];
$return[get_class($this) . '_AstVoicemailEmail'] = array('<block><key>' . _('Email address') . '</key><value>' . $AstVoicemailEmail . '</value></block>');
$AstVoicemailOptions = '';
if (isset($this->attributes['AstVoicemailOptions'][0])) $AstVoicemailOptions = $this->attributes['AstVoicemailOptions'][0];
$return[get_class($this) . '_AstVoicemailOptions'] = array('<block><key>' . _('Options') . '</key><value>' . $AstVoicemailOptions . '</value></block>');
$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;
}

View File

@ -4,7 +4,7 @@ $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
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] = '<block><key>' . _('Authorized Services') . '</key><value>' . implode(', ', $this->attributes['authorizedService']) . '</value></block>';
$this->addSimplePDFField($return, 'authorizedService', _('Authorized Services'));
}
return $return;
}

View File

@ -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('<block><key>' . _('Subnet') . '</key><value>' . $this->attributes['cn'][0] . '</value></block>'),
$return = array(
get_class($this) . '_domainName' => array('<block><key>' . _('Domain name') . '</key><value>' . $this->getDHCPOption('domain-name') . '</value></block>'),
get_class($this) . '_leaseTime' => array('<block><key>' . _('Lease time') . '</key><value>' . $this->getDefaultLeaseTime() . '</value></block>'),
get_class($this) . '_maxLeaseTime' => array('<block><key>' . _('Maximum lease time') . '</key><value>' . $this->getMaxLeaseTime() . '</value></block>'),
@ -636,9 +635,11 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
get_class($this) . '_netbiosServer' => array('<block><key>' . _('Netbios name servers') . '</key><value>' . $this->getDHCPOption('netbios-name-servers') . '</value></block>'),
get_class($this) . '_netbiosType' => array('<block><key>' . _('Netbios node type') . '</key><value>' . $nodeTypeValue . '</value></block>'),
get_class($this) . '_subnetMask' => array('<block><key>' . _('Subnet mask') . '</key><value>' . $this->getDHCPOption('subnet-mask') . '</value></block>'),
get_class($this) . '_netMask' => array('<block><key>' . _('Net mask') . '</key><value>' . $this->attributes['dhcpNetMask'][0] . '</value></block>'),
get_class($this) . '_description' => array('<block><key>' . _('Description') . '</key><value>' . $this->attributes['dhcpComments'][0] . '</value></block>'),
);
$this->addSimplePDFField($return, 'description', _('Description'), 'dhcpComments');
$this->addSimplePDFField($return, 'subnet', _('Subnet'), 'cn');
$this->addSimplePDFField($return, 'netMask', _('Net mask'), 'dhcpNetMask');
return $return;
}
/**

View File

@ -763,40 +763,16 @@ class eduPerson extends baseModule {
*/
function get_pdfEntries() {
$return = array();
if (isset($this->attributes['eduPersonPrimaryAffiliation'][0])) {
$return['eduPerson_primaryAffiliation'][0] = '<block><key>' . _('Primary affiliation') . '</key><value>' . $this->attributes['eduPersonPrimaryAffiliation'][0] . '</value></block>';
}
if (isset($this->attributes['eduPersonScopedAffiliation'][0])) {
$return['eduPerson_scopedAffiliation'][0] = '<block><key>' . _('Scoped affiliations') . '</key><value>' . implode(', ', $this->attributes['eduPersonScopedAffiliation']) . '</value></block>';
}
if (isset($this->attributes['eduPersonPrincipalName'][0])) {
$return['eduPerson_principalName'][0] = '<block><key>' . _('Principal name') . '</key><value>' . $this->attributes['eduPersonPrincipalName'][0] . '</value></block>';
}
if (isset($this->attributes['eduPersonNickname'][0])) {
sort($this->attributes['eduPersonNickname']);
$return['eduPerson_nickname'][0] = '<block><key>' . _('Nick names') . '</key><value>' . implode(', ', $this->attributes['eduPersonNickname']) . '</value></block>';
}
if (isset($this->attributes['eduPersonAffiliation'][0])) {
sort($this->attributes['eduPersonAffiliation']);
$return['eduPerson_affiliation'][0] = '<block><key>' . _('Affiliations') . '</key><value>' . implode(', ', $this->attributes['eduPersonAffiliation']) . '</value></block>';
}
if (isset($this->attributes['eduPersonEntitlement'][0])) {
sort($this->attributes['eduPersonEntitlement']);
$return['eduPerson_entitlement'][0] = '<block><key>' . _('Entitlements') . '</key><value>' . implode(', ', $this->attributes['eduPersonEntitlement']) . '</value></block>';
}
if (isset($this->attributes['eduPersonOrgDN'][0])) {
$return['eduPerson_orgDN'][0] = '<block><key>' . _('Organisation') . '</key><value>' . $this->attributes['eduPersonOrgDN'][0] . '</value></block>';
}
if (isset($this->attributes['eduPersonPrimaryOrgUnitDN'][0])) {
$return['eduPerson_primaryOrgUnitDN'][0] = '<block><key>' . _('Primary organisational unit') . '</key><value>' . $this->attributes['eduPersonPrimaryOrgUnitDN'][0] . '</value></block>';
}
if (isset($this->attributes['eduPersonOrgUnitDN'][0])) {
$return['eduPerson_orgUnitDN'][0] = '<block><key>' . _('Organisational units') . '</key><value>' . implode(', ', $this->attributes['eduPersonOrgUnitDN']) . '</value></block>';
}
if (isset($this->attributes['eduPersonAssurance'][0])) {
sort($this->attributes['eduPersonAssurance']);
$return['eduPerson_eduPersonAssurance'][0] = '<block><key>' . _('Assurance profiles') . '</key><value>' . implode(', ', $this->attributes['eduPersonAssurance']) . '</value></block>';
}
$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;
}

View File

@ -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);

View File

@ -196,7 +196,7 @@ class lamAsteriskExtList extends lamList {
unset($entries[$key]);
}
}
return $entries;
return array_values($entries);
}
}

View File

@ -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;
}
}
}
?>