~ubuntu-branches/ubuntu/trusty/ldap-account-manager/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/modules/puppetClient.inc

  • Committer: Package Import Robot
  • Author(s): Roland Gruber
  • Date: 2013-07-21 11:15:58 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130721111558-ex49xgcpo71fh0xg
Tags: 4.2.1-2
* Apache 2.4 support
* Fix "transition towards Apache 2.4" 
  support conf-enabled (Closes: #669824)
* Fix "[ldap-account-manager] Can't install ldap-account-manager"
  support conf-enabled (Closes: #711778)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
 
$Id: puppetClient.inc 4564 2012-08-26 14:10:33Z gruberroland $
 
3
$Id: puppetClient.inc 4901 2013-05-07 19:18:21Z gruberroland $
4
4
 
5
5
  This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
6
 
  Copyright (C) 2012  Roland Gruber
 
6
  Copyright (C) 2012 - 2013  Roland Gruber
7
7
 
8
8
  This program is free software; you can redistribute it and/or modify
9
9
  it under the terms of the GNU General Public License as published by
417
417
        */
418
418
        function get_pdfEntries() {
419
419
                $return = array();
420
 
                if (in_array('puppetClient', $this->attributes['objectClass'])) {
421
 
                        if (isset($this->attributes['environment'][0])) {
422
 
                                $return['puppetClient_environment'][0] = '<block><key>' . _('Environment') . '</key><value>' . implode(', ', $this->attributes['environment']) . '</value></block>';
423
 
                        }
424
 
                        if (isset($this->attributes['parentnode'][0])) {
425
 
                                $return['puppetClient_parentnode'][0] = '<block><key>' . _('Parent node') . '</key><value>' . $this->attributes['parentnode'][0] . '</value></block>';
426
 
                        }
427
 
                        if (isset($this->attributes['puppetclass'][0])) {
428
 
                                $return['puppetClient_puppetclass'][0] = '<block><key>' . _('Classes') . '</key><tr><td align=\"L\">' . $this->attributes['puppetclass'][0] . '</td></tr></block>';
429
 
                                for ($i = 1; $i < sizeof($this->attributes['puppetclass']); $i++) {
430
 
                                        $return['puppetClient_puppetclass'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetclass'][$i] . '</td></tr></block>';
431
 
                                }
432
 
                        }
433
 
                        if (isset($this->attributes['puppetvar'][0])) {
434
 
                                $return['puppetClient_puppetvar'][0] = '<block><key>' . _('Variables') . '</key><tr><td align=\"L\">' . $this->attributes['puppetvar'][0] . '</td></tr></block>';
435
 
                                for ($i = 1; $i < sizeof($this->attributes['puppetvar']); $i++) {
436
 
                                        $return['puppetClient_puppetvar'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetvar'][$i] . '</td></tr></block>';
437
 
                                }
 
420
                if (!in_array('puppetClient', $this->attributes['objectClass'])) {
 
421
                        return $return;
 
422
                }
 
423
                $this->addSimplePDFField($return, 'environment', _('Environment'));
 
424
                $this->addSimplePDFField($return, 'parentnode', _('Parent node'));
 
425
                if (isset($this->attributes['puppetclass'][0])) {
 
426
                        $return['puppetClient_puppetclass'][0] = '<block><key>' . _('Classes') . '</key><tr><td align=\"L\">' . $this->attributes['puppetclass'][0] . '</td></tr></block>';
 
427
                        for ($i = 1; $i < sizeof($this->attributes['puppetclass']); $i++) {
 
428
                                $return['puppetClient_puppetclass'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetclass'][$i] . '</td></tr></block>';
 
429
                        }
 
430
                }
 
431
                if (isset($this->attributes['puppetvar'][0])) {
 
432
                        $return['puppetClient_puppetvar'][0] = '<block><key>' . _('Variables') . '</key><tr><td align=\"L\">' . $this->attributes['puppetvar'][0] . '</td></tr></block>';
 
433
                        for ($i = 1; $i < sizeof($this->attributes['puppetvar']); $i++) {
 
434
                                $return['puppetClient_puppetvar'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetvar'][$i] . '</td></tr></block>';
438
435
                        }
439
436
                }
440
437
                return $return;