summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48f5da5)
raw | patch | inline | side by side (parent: 48f5da5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Oct 2005 08:48:05 +0000 (08:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Oct 2005 08:48:05 +0000 (08:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1616 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationStartup.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 90afd398c0c7e2b463d4b2c2dc4af46e0557f529..658bc088622d07dbd4c927ff1b5d57452eb43056 100644 (file)
function workstartup ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
-
/* Creating a list of valid Mirrors
* none will not be saved to ldap.
*/
$this->FAIdebianMirrors = array("none"=>_("none"));
$ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
$ldap->search("(objectClass=FAIrepository)",array("FAIdebianMirror"));
/* attach all attributes with "index => cn" to avoid multiple entries */
}
/* Show main page */
- return($smarty->fetch (get_template_path('workstationStartup.tpl', TRUE)));
+ return($smarty->fetch (get_template_path('workstationStartup.tpl', TRUE,dirname(__FILE__))));
}
function remove_from_parent()
/* Save to LDAP */
function save()
{
+
+ /* Depending on the baseobject (Ogroup / WS) we
+ * use another set of objectClasses
+ * In case of WS itself, we use "array("GOhard", "FAIobject");"
+ * if we are currently editing from ogroup menu we use (array("gotWorkstationTemplate","GOhard", "FAIobject"))
+ */
+ if(isset($this->parent->by_object['ogroup'])){
+ $this->objectclasses = array("gotoWorkstationTemplate","GOhard", "FAIobject");
+ }elseif(isset($this->parent->by_object['workgeneric'])){
+ $this->objectclasses = array("GOhard", "FAIobject");
+ }else{
+ print "unknown";
+ exit();
+ }
+
/* Find proper terminal path for tftp configuration
FIXME: This is suboptimal when the default has changed to
another location! */
$this->attrs['FAIdebianMirror'] = array();
}
+ /* prepare share settings */
+ $tmp = array();
+ foreach($this->gotoShares as $name => $settings){
+ $tmp[] = $settings['server']."|".$name."|".$settings['mountPoint'];
+ }
+ $this->attrs['gotoShare']=$tmp;
+
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$ldap->modify($this->attrs);