From a62237cb3b5d065479dbc52609f9b963f398cfa3 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 12 Nov 2007 08:53:23 +0000 Subject: [PATCH] Added fix from stable. Not tested yet. - Add new objects to object group first, then save. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7767 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 4b8198c4a..42addca64 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -736,20 +736,6 @@ class systems extends plugin /* Save, or display error message? */ if (count($message) == 0){ - /* Save terminal data to ldap */ - if(isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){ - foreach (array("workservice", "termservice") as $cls){ - if (isset($this->systab->by_object[$cls])){ - $this->systab->by_object[$cls]->gotoXMouseport= ""; - $this->systab->by_object[$cls]->gotoXMouseType= ""; - $this->systab->by_object[$cls]->gotoXResolution= ""; - $this->systab->by_object[$cls]->gotoXColordepth= ""; - } - } - } - - $this->systab->save(); - /* Incoming behavior; you can select a system type and an ogroup membership. * If this object is an Incoming object, $_SESSION['SelectedSystemType'] isset. * Check if we must add the new object to an object group. @@ -761,7 +747,6 @@ class systems extends plugin if(isset($_SESSION['SelectedSystemType'])){ $SelectedSystemType= $_SESSION['SelectedSystemType']; - unset($_SESSION['SelectedSystemType']); if($SelectedSystemType['ogroup'] != "none"){ $og = new ogroup($this->config,$SelectedSystemType['ogroup']); if($og){ @@ -769,6 +754,24 @@ class systems extends plugin $og->save(); } } + } + + /* Save terminal data to ldap */ + if(isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){ + foreach (array("workservice", "termservice") as $cls){ + if (isset($this->systab->by_object[$cls])){ + $this->systab->by_object[$cls]->gotoXMouseport= ""; + $this->systab->by_object[$cls]->gotoXMouseType= ""; + $this->systab->by_object[$cls]->gotoXResolution= ""; + $this->systab->by_object[$cls]->gotoXColordepth= ""; + } + } + } + + $this->systab->save(); + + if(isset($_SESSION['SelectedSystemType'])){ + unset($_SESSION['SelectedSystemType']); if(!isset($ldap)){ $ldap = $this->config->get_ldap_link(); } -- 2.30.2