Code

Updated preg_matches
[gosa.git] / plugins / admin / systems / class_systemManagement.inc
index a039c2ecca8e3ef1f5715b2cb9340b44c47e326c..4d210ca563e47a6d75fcad561d11b27c3a2c3880 100644 (file)
@@ -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]);