Code

Updated filenames
[gosa.git] / gosa-plugins / goto / admin / systems / goto / Device / class_InstallRecipe.inc
1 <?php
3 class installRecipe extends plugin
4 {
5     public $member = array();
6     public $ksTemplate = "";
7     public $ksKeyboardlayout = "";
8     public $ksSystemLocale = "";
9     public $ksTimezone = "";
10     public $ksTimeUTC = "";
11     public $ksNTPServer = "";
12     public $ksMirror = "";
13     public $ksMirrorTorrent = "";
14     public $ksRootEnabled = "";
15     public $ksRootPasswordHash = "";
16     public $ksKernelPackage = "";
17     public $ksPartitionTable = "";
19     public $objectclasses = array('installRecipe');
20     public $attributes = array("member","ksTemplate","ksKeyboardlayout","ksSystemLocale",
21             "ksTimezone","ksTimeUTC","ksNTPServer","ksMirror","ksMirrorTorrent",
22             "ksRootEnabled","ksRootPasswordHash","ksKernelPackage","ksPartitionTable");
24     function __construct(&$config, $dn)
25     {
26         plugin::plugin($config, $dn);
27     }
29     function execute()
30     {
31         plugin::execute();    
32         $smarty = get_smarty();
33         foreach($this->attributes as $attr){
34             $smarty->assign($attr, $this->$attr);
35         }
36         return($smarty->fetch(get_template_path('goto/Device/installRecipe.tpl', TRUE)));
37     }
40     function save()
41     {
42         plugin::save();
43         $this->cleanup();
44         $ldap=$this->config->get_ldap_link();
45         $ldap->cd($this->config->current['BASE']);
46         $ldap->cd($this->dn);
47         $ldap->modify($this->attrs);
48         echo $ldap->get_error();
49     }
51     static function plInfo()
52     {
53         return (array(
54                     "plShortName"   => _("Device"),
55                     "plDescription" => _("Registered device"),
56                     "plSelfModify"  => FALSE,
57                     "plDepends"     => array(),
58                     "plPriority"    => 1,
59                     "plSection"     => array("administration"),
60                     "plCategory"    => array("registeredDevice"),
61                     "plProvidedAcls" => array(
62                         "member" => _("Member"),
63                         "ksTemplate" => _("Template"),
64                         "ksKeyboardlayout" => _("Keyboard layout"),
65                         "ksSystemLocale" => _("System locale"),
66                         "ksTimezone" => _("Timezone"),
67                         "ksTimeUTC" => _("Time"),
68                         "ksNTPServer" => _("NTP-Server"),
69                         "ksMirror" => _("Kickstart mirror"),
70                         "ksMirrorTorrent" => _("Kickstart torrent mirror"),
71                         "ksRootEnabled" => _("Root login enabled"),
72                         "ksRootPasswordHash" => _("Root password hash"),
73                         "ksKernelPackage" => _("Kernal package"),
74                         "ksPartitionTable" => _("Partition table")
75                         )
76                         )
77                         );
78     }
79 }
81 ?>