diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 00f39f4af094850b32daf65f70d49c387f677352..e49653d78523dfdac10151dadcf8c159f7c29edf 100644 (file)
$ui = get_userinfo();
$tabs = array(
+ "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
+ "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
"terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
"workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
"server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
$this->dn = $this->terminals[$s_entry]['dn'];
$attrs = $this->terminals[$s_entry];
+
+
$type= $this->get_system_type($attrs);
$ui = get_userinfo();
$tabs = array(
+ "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
+ "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
"terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
"workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
"server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
"winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
"component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
-
/* get object type */
$tabtype = "termtabs";
$tabobj = "TERMTABS";
$ui = get_userinfo();
$tabs = array(
+ "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
+ "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
"terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
"workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
"server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
/* Finish user edit is triggered by the tabulator dialog, so
the user wants to save edited data. Check and save at this
point. */
- if ((isset($_POST['edit_finish'])) && (isset($this->systab->config)) || $save_object_directly){
+ if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->systab->config)) || $save_object_directly){
/* Check tabs, will feed message array */
$message = array();
$found = false;
/* Set gotoMode to active if we there was an ogroup selected . (save_object_directly) */
- foreach(array("workgeneric"=>"active","servgeneric"=>"active","termgeneric"=>"graphic") as $tab => $value){
+ foreach(array("workgeneric"=>"active","servgeneric"=>"active","termgeneric"=>"active") as $tab => $value){
if(isset($this->systab->by_object[$tab]->gotoMode)) {
$found = true;
$this->systab->by_object[$tab]->gotoMode = $value;
$ldap->cd($this->config->current['BASE']);
}
- /* Terminal has been saved successfully, remove lock from
- LDAP. */
- if ($this->dn != "new"){
- del_lock ($this->dn);
- }
+ /* Terminal has been saved successfully, remove lock from LDAP. */
+ if (!isset($_POST['edit_apply'])){
+ if ($this->dn != "new"){
+ del_lock ($this->dn);
+ }
- unset ($this->systab);
- $this->systab= NULL;
- session::un_set('objectinfo');
+ unset ($this->systab);
+ $this->systab= NULL;
+ session::un_set('objectinfo');
+ }
} else {
/* Ok. There seem to be errors regarding to the tab data,
show message and continue as usual. */
$dialog = TRUE;
}
}
- if(isset($this->systab->by_object[$this->systab->current]->netConfigDNS) &&
+ if(isset($this->systab->current) && isset($this->systab->by_object[$this->systab->current]->netConfigDNS) &&
$this->systab->by_object[$this->systab->current]->netConfigDNS->dialog){
$dialog = TRUE;
}
/* Attributes to fetch */
$sys_attrs = array("cn", "description", "macAddress", "objectClass", "sambaDomainName","gotoMode");
- $sys_categories = array("terminal", "workstation", "server", "phone" ,"printer");
+ $sys_categories = array("terminal", "workstation", "server", "phone" ,"printer","incoming");
/* Add FAIstate to attributes if FAI is activated */
$tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
/* Search for incoming objects */
$filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
- $res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou'),get_ou('incomingou').$base,$sys_attrs, GL_NONE | GL_SIZELIMIT));
+ $res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou').$base,$sys_attrs, GL_NONE | GL_SIZELIMIT));
/* Get all gotoTerminal's */
foreach ($res as $value){
/* Detect type of object and create an entry for $this->terminals */
$terminal = array();
-
if (in_array_ics('gotoTerminal', $value["objectClass"])){
/* check acl */