added addPDFKeyValue()

This commit is contained in:
Roland Gruber 2015-03-08 20:09:18 +00:00
parent 03344bfada
commit 217b947ea1
4 changed files with 18 additions and 19 deletions

View File

@ -421,11 +421,11 @@ class ddns extends baseModule {
if (isset($zones[1])) { if (isset($zones[1])) {
$revzone = $zones[1]; $revzone = $zones[1];
} }
return array( $result = array();
get_class($this) . '_DNSserver' => array('<block><key>' . _('IP address of the DNS server') . '</key><value>' . $this->getDNSServer() . '</value></block>'), $this->addPDFKeyValue($result, 'DNSserver', _('IP address of the DNS server'), $this->getDNSServer());
get_class($this) . '_zone' => array('<block><key>' . _('Zone name') . '</key><value>' . $zone . '</value></block>'), $this->addPDFKeyValue($result, 'zone', _('Zone name'), $zone);
get_class($this) . '_reverseZone' => array('<block><key>' . _('Reverse zone name') . '</key><value>' . $revzone . '</value></block>'), $this->addPDFKeyValue($result, 'reverseZone', _('Reverse zone name'), $revzone);
); return $result;
} }
/** /**

View File

@ -671,17 +671,16 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
if (!empty($unknownClientsVal)) { if (!empty($unknownClientsVal)) {
$unknownClients = $this->allowDenyOptions[$unknownClientsVal]; $unknownClients = $this->allowDenyOptions[$unknownClientsVal];
} }
$return = array( $return = array();
get_class($this) . '_domainName' => array('<block><key>' . _('Domain name') . '</key><value>' . $this->getDHCPOption('domain-name') . '</value></block>'), $this->addPDFKeyValue($return, 'domainName', _('Domain name'), $this->getDHCPOption('domain-name'));
get_class($this) . '_leaseTime' => array('<block><key>' . _('Lease time') . '</key><value>' . $this->getDefaultLeaseTime() . '</value></block>'), $this->addPDFKeyValue($return, 'leaseTime', _('Lease time'), $this->getDefaultLeaseTime());
get_class($this) . '_maxLeaseTime' => array('<block><key>' . _('Maximum lease time') . '</key><value>' . $this->getMaxLeaseTime() . '</value></block>'), $this->addPDFKeyValue($return, 'maxLeaseTime', _('Maximum lease time'), $this->getMaxLeaseTime());
get_class($this) . '_DNSserver' => array('<block><key>' . _('DNS') . '</key><value>' . $this->getDHCPOption('domain-name-servers') . '</value></block>'), $this->addPDFKeyValue($return, 'DNSserver', _('DNS'), $this->getDHCPOption('domain-name-servers'));
get_class($this) . '_gateway' => array('<block><key>' . _('Default gateway') . '</key><value>' . $this->getDHCPOption('routers') . '</value></block>'), $this->addPDFKeyValue($return, 'gateway', _('Default gateway'), $this->getDHCPOption('routers'));
get_class($this) . '_netbiosServer' => array('<block><key>' . _('Netbios name servers') . '</key><value>' . $this->getDHCPOption('netbios-name-servers') . '</value></block>'), $this->addPDFKeyValue($return, 'netbiosServer', _('Netbios name servers'), $this->getDHCPOption('netbios-name-servers'));
get_class($this) . '_netbiosType' => array('<block><key>' . _('Netbios node type') . '</key><value>' . $nodeTypeValue . '</value></block>'), $this->addPDFKeyValue($return, 'netbiosType', _('Netbios node type'), $nodeTypeValue);
get_class($this) . '_subnetMask' => array('<block><key>' . _('Subnet mask') . '</key><value>' . $this->getDHCPOption('subnet-mask') . '</value></block>'), $this->addPDFKeyValue($return, 'subnetMask', _('Subnet mask'), $this->getDHCPOption('subnet-mask'));
get_class($this) . '_unknownClients' => array('<block><key>' . _('Unknown clients') . '</key><value>' . $unknownClients . '</value></block>'), $this->addPDFKeyValue($return, 'unknownClients', _('Unknown clients'), $unknownClients);
);
$this->addSimplePDFField($return, 'description', _('Description'), 'dhcpComments'); $this->addSimplePDFField($return, 'description', _('Description'), 'dhcpComments');
$this->addSimplePDFField($return, 'subnet', _('Subnet'), 'cn'); $this->addSimplePDFField($return, 'subnet', _('Subnet'), 'cn');
$this->addSimplePDFField($return, 'netMask', _('Net mask'), 'dhcpNetMask'); $this->addSimplePDFField($return, 'netMask', _('Net mask'), 'dhcpNetMask');

View File

@ -699,14 +699,14 @@ class freeRadius extends baseModule {
$this->addSimplePDFField($return, 'radiusIdleTimeout', _('Idle timeout')); $this->addSimplePDFField($return, 'radiusIdleTimeout', _('Idle timeout'));
$this->addSimplePDFField($return, 'radiusProfileDn', _('Profile')); $this->addSimplePDFField($return, 'radiusProfileDn', _('Profile'));
if (isset($this->attributes['radiusExpiration'][0])) { if (isset($this->attributes['radiusExpiration'][0])) {
$return[get_class($this) . '_radiusExpiration'][0] = '<block><key>' . _('Expiration date') . '</key><value>' . $this->formatExpirationDate($this->attributes['radiusExpiration'][0]) . '</value></block>'; $this->addPDFKeyValue($return, 'radiusExpiration', _('Expiration date'), $this->formatExpirationDate($this->attributes['radiusExpiration'][0]));
} }
if (isset($this->attributes['dialupAccess'][0])) { if (isset($this->attributes['dialupAccess'][0])) {
$enabled = _('Yes'); $enabled = _('Yes');
if (in_array($this->attributes['dialupAccess'][0], array('false', 'FALSE'))) { if (in_array($this->attributes['dialupAccess'][0], array('false', 'FALSE'))) {
$enabled = _('No'); $enabled = _('No');
} }
$return[get_class($this) . '_dialupAccess'][0] = '<block><key>' . _('Enabled') . '</key><value>' . $enabled . '</value></block>'; $this->addPDFKeyValue($return, 'dialupAccess', _('Enabled'), $enabled);
} }
return $return; return $return;
} }

View File

@ -571,7 +571,7 @@ class kolabSharedFolder extends baseModule { // TODO folder type
if (isset($typeList[$type])) { if (isset($typeList[$type])) {
$type = $typeList[$type]; $type = $typeList[$type];
} }
$return[get_class($this) . '_kolabFolderType'] = array('<block><key>' . _('Type') . '</key><value>' . $type . '</value></block>'); $this->addPDFKeyValue($return, 'kolabFolderType', _('Type'), $type);
} }
return $return; return $return;
} }