Code

Replaced in_array calls for gosa-plugins
[gosa.git] / gosa-plugins / goto / admin / systems / services / terminal / class_goTerminalServer.inc
index 0dc4184cbdfd793f446fbc450b62960e4154cbdb..e001d6399f7c48ee9c5f758a42e6d6ad2747dd8e 100644 (file)
@@ -2,10 +2,6 @@
 
 class goTerminalServer extends goService{
        
-  var $cli_summary      = "This pluign is used within the ServerService Pluign \nand indicates that this server supports asterisk management.";
-  var $cli_description  = "Some longer text\nfor help";
-  var $cli_parameters   = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
   /* This plugin only writes its objectClass */
   var $objectclasses    = array("goTerminalServer");
   var $attributes       = array("goXdmcpIsEnabled","gotoSessionType");
@@ -36,7 +32,8 @@ class goTerminalServer extends goService{
       }
     }
     $this->gotoSessionType = $tmp;
-    $this->gotoSessionTypes= array("LDM","XDCMP","RDP","CITRIX"); 
+    #$this->gotoSessionTypes= array("LDM","XDMCP","RDP","CITRIX"); 
+    $this->gotoSessionTypes= array("LDM","XDMCP", "SHELL", "RDP", "TELNET"); 
   }
 
 
@@ -61,7 +58,7 @@ class goTerminalServer extends goService{
 
     $tmp = array();
     foreach($this->gotoSessionTypes as $type){
-      if(in_array($type,$this->gotoSessionType)){
+      if(in_array_strict($type,$this->gotoSessionType)){
         $tmp[$type] = TRUE;
       }else{
         $tmp[$type] = FALSE;
@@ -77,7 +74,7 @@ class goTerminalServer extends goService{
   {
     $fields               = goService::getListEntry();
     $fields['Message']    = _("Terminal service");
-    $fields['AllowEdit']  = true;
+    #$fields['AllowEdit']  = true;
     return($fields);
   }
 
@@ -102,7 +99,9 @@ class goTerminalServer extends goService{
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
     }
-    show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/terminalServer with dn '%s' failed."),$this->dn));
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+    }
     if($this->initially_was_account){
       $this->handle_post_events("modify");
       new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
@@ -153,7 +152,8 @@ class goTerminalServer extends goService{
       }
     }
     $this->gotoSessionType = $tmp;
-    $this->gotoSessionTypes= array("LDM","XDCMP","RDP","CITRIX"); 
+    #$this->gotoSessionTypes= array("LDM","XDMCP","RDP","CITRIX"); 
+    $this->gotoSessionTypes= array("LDM","XDMCP", "SHELL", "TELNET"); 
   }