From 99b0a430dfa6d1cfad04ccf0302e1fbff0b02e28 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Nov 2006 04:29:19 +0000 Subject: [PATCH] Fixed Terminal/Workstation -template string in mangement list. 'Workstation template for ..' the department of the object will be shown instead of current selected department git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5180 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_divListSystem.inc | 3 ++- plugins/admin/systems/class_systemManagement.inc | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 1d465a18a..6353c3e4b 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -184,8 +184,9 @@ class divListSystem extends MultiSelectWindow $action2= "".$action2; } + /* Add Message generated by mangement->reload*/ if(isset($val['message'])){ - $display.= " (".$val['message']." '".$this->config->idepartments[$_SESSION['CurrentMainBase']]."' )"; + $display.= " (".$val['message'].")"; } $img = $this->parent->convert_list($val); diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index a039c2ecc..4d210ca56 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -720,6 +720,12 @@ echo "ACL CHECK!"; } } + /* Create a string containing the last part of the department. */ + $dn_name = preg_replace("#^([^/]+/)*#","",convert_department_dn(@LDAP::fix($tmp))); + if(empty($dn_name)){ + $dn_name = "/"; + } + /* Detect type of object and create an entry for $this->terminals */ $terminal = array(); if ((in_array ($tmp, $responsible)) || ($add != "")){ @@ -731,7 +737,7 @@ echo "ACL CHECK!"; } else { $terminal = $value; $terminal['type'] = "D"; - $terminal['message'] = _("Terminal template for"); + $terminal['message'] = _("Terminal template for")." '".$dn_name."' "; $terminal['location'] = array_search($tmp, $this->config->departments); } } elseif (in_array_ics('gotoWorkstation', $value["objectClass"])){ @@ -743,7 +749,7 @@ echo "ACL CHECK!"; $terminal = $value; $terminal['type'] = "D"; $terminal['location'] = array_search($tmp, $this->config->departments); - $terminal['message'] = _("Workstation template for"); + $terminal['message'] = _("Workstation template for")." '".$dn_name."' "; } if (isset($value["FAIstate"][0])){ $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]); -- 2.30.2