summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e22436)
raw | patch | inline | side by side (parent: 9e22436)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Oct 2005 09:23:53 +0000 (09:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Oct 2005 09:23:53 +0000 (09:23 +0000) |
If a WS is attached this tabs will appear.
Deletion, works too.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1618 594d385d-05f5-0310-b6e9-bd551577e9d8
Deletion, works too.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1618 594d385d-05f5-0310-b6e9-bd551577e9d8
index 7bab9be66701c0a9e22012fc6c363714ac0a71b9..896a1592399ee5f974fa396f6c8f44e8413e0788 100644 (file)
/* Remove ws tabs, if theres no ws left in the object list */
if((!preg_match("/W/",$objects))&&(isset($this->by_object['workstartup']))){
-// $this->by_object['workstartup']->remove_from_parent();
- unset($this->by_object['workstartup']);
- unset($this->by_name['workstartup']);
-// $this->by_object['workservice']->remove_from_parent();
+ $this->by_object['workservice']->remove_from_parent();
unset($this->by_object['workservice']);
unset($this->by_name['workservice']);
+ $this->by_object['workstartup']->remove_from_parent();
+ unset($this->by_object['workstartup']);
+ unset($this->by_name['workstartup']);
}
/* Create goPhoneAccount if theres an user with goPhoneAccount
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index b4d1f3b0a8b67486b20529643fd5a4391a9299de..a074429e75d3451fdb31693b8e1bb2a4387bf85b 100644 (file)
/* attribute list for save action */
- var $attributes= array("cn","gotoXMonitor",
+ var $attributes= array("gotoXMonitor",
"gotoXDriver", "gotoXResolution", "gotoXColordepth",
"gotoXHsync", "gotoXVsync",
"gotoScannerEnable", "gotoScannerClients",
function remove_from_parent()
{
- $ldap= $this->config->get_ldap_link();
+ /* This is not necessary, i think
+ * Remove should be called from workGeneric ...
+ */
+ /*$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
show_ldap_error($ldap->get_error());
$this->handle_post_events("remove");
- }
+ */
+
+ $ldap= $this->config->get_ldap_link();
+ plugin::remove_from_parent();
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());}
/* Save data to object */
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 658bc088622d07dbd4c927ff1b5d57452eb43056..ac0077fd9ea1796481211dc733f751698b51e8c4 100644 (file)
function remove_from_parent()
{
+ /*
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
show_ldap_error($ldap->get_error());
$this->handle_post_events("remove");
+ */
+
+
+ /* 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();
+ }
+
+ $ldap= $this->config->get_ldap_link();
+ plugin::remove_from_parent();
+
+ foreach(array("gotoModules", "gotoAutoFs", "gotoFilesystem") as $attr){
+ $this->attrs [$attr] = array();
+ }
+
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
+
}