From: hickert Date: Thu, 23 Nov 2006 06:52:13 +0000 (+0000) Subject: Terminal/Workstation tabs; X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=62cc124fe8519af476363aa197001bbb9c00e826;p=gosa.git Terminal/Workstation tabs; Assign cn from generic tab to all other tabs. Else checks like cn=="default" will not work in all non generic tabs. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5206 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/tabs_terminal.inc b/plugins/admin/systems/tabs_terminal.inc index 7e98d82a8..cac248e2e 100644 --- a/plugins/admin/systems/tabs_terminal.inc +++ b/plugins/admin/systems/tabs_terminal.inc @@ -35,6 +35,12 @@ class termtabs extends tabs $this->by_object['termstartup']->gotoTerminalPath= $this->by_object['termgeneric']->gotoTerminalPath; } + + /* Assign current cn to all other plugins */ + $baseobject= $this->by_object['termgeneric']; + foreach ($this->by_object as $key => $obj){ + $this->by_object[$key]->cn= $baseobject->cn; + } } diff --git a/plugins/admin/systems/tabs_workstation.inc b/plugins/admin/systems/tabs_workstation.inc index 34298b095..7dcafd2c8 100644 --- a/plugins/admin/systems/tabs_workstation.inc +++ b/plugins/admin/systems/tabs_workstation.inc @@ -29,6 +29,13 @@ class worktabs extends tabs function save_object($save_current= FALSE) { tabs::save_object($save_current); + + /* Assign current cn to all other plugins */ + $baseobject= $this->by_object['termgeneric']; + foreach ($this->by_object as $key => $obj){ + $this->by_object[$key]->dn= $this->dn; + $this->by_object[$key]->cn= $baseobject->cn; + } } @@ -47,8 +54,10 @@ class worktabs extends tabs tabs::save(TRUE); - if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){ - $this->by_object['printgeneric']->remove_from_parent(); + if(isset($this->by_object['printgeneric'])){ + if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){ + $this->by_object['printgeneric']->remove_from_parent(); + } } /* Fix tagging if needed */