Code

Column name changed.
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_terminalService.inc
index 63fe1fce14b105c05e6f178ddf7524cc7c7bb075..f0e66df31ab213b490719df46d3acfcdc46f0fc8 100644 (file)
@@ -95,8 +95,8 @@ class termservice extends plugin
           "1400x1050" =>  "1400x1050",
           "1600x1200" =>  "1600x1200");
 
-    if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
-      $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
+    if($this->config->get_cfg_value("resolutions") != ""){
+      $file = $this->config->get_cfg_value("resolutions");
       if(is_readable($file)){
         $str = file_get_contents($file);
         $lines = split("\n",$str);
@@ -107,7 +107,7 @@ class termservice extends plugin
           }
         }
       }else{
-        print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file));
+        msg_dialog::display(_("Configuration error"), msgPool::cannotReadFile($file), WARNING_DIALOG);
       }
     }
 
@@ -180,7 +180,7 @@ class termservice extends plugin
 
     /* Load phone hardware list 
      */
-    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneou")), 
+    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")), 
                   $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
     foreach($tmp as $attrs){
       $cn= $attrs['cn'][0];
@@ -199,12 +199,12 @@ class termservice extends plugin
     $deps_a = array(
         get_people_ou(),
         get_ou("ogroupou"),
-        get_ou("serverou"),
-        get_ou("terminalou"),
-        get_ou("workstationou"),
-        get_ou("printerou"),
-        get_ou("componentou"),
-        get_ou("phoneou"));
+        get_ou("serverRDN"),
+        get_ou("terminalRDN"),
+        get_ou("workstationRDN"),
+        get_ou("printerRDN"),
+        get_ou("componentRDN"),
+        get_ou("phoneRDN"));
 
     $tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'],
         array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
@@ -303,7 +303,7 @@ class termservice extends plugin
 
     /* Do we represent a valid terminal? */
     if (!$this->is_account && $this->parent === NULL){
-      $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\">&nbsp;<b>".
+      $display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\">&nbsp;<b>".
         _("This 'dn' has no terminal features.")."</b>";
       return ($display);
     }
@@ -438,14 +438,6 @@ class termservice extends plugin
   {
     new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
     $this->handle_post_events("remove");
-
-    plugin::remove_from_parent();
-    $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->dn);
-    $ldap->modify($this->attrs);
-    if (!$ldap->success()){
-      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
-    }
   }
 
 
@@ -485,13 +477,12 @@ class termservice extends plugin
         /* Check vsync for correct usage */
         $val= preg_replace ("/\s/", "", $this->gotoXVsync);
         if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXVsync")){
-
-          $message[]= _("Please specify a valid VSync range.");
+          $message[]= msgPool::invalid(_("VSync range"));
         } elseif ($this->acl_is_writeable("gotoXVsync")){
           list($v1,$v2)= preg_split ("/[-+]/", $val);
           if ($v2 != ""){
             if ($v1 > $v2){
-              $message[]= _("Please specify a valid VSync range.");
+              $message[]= msgPool::invalid(_("VSync range"));
             }
           }
         }
@@ -499,13 +490,12 @@ class termservice extends plugin
         /* Check hsync for correct usage */
         $val= preg_replace ("/\s/", "", $this->gotoXHsync);
         if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXHsync")){
-
-          $message[]= _("Please specify a valid HSync range.");
+          $message[]= msgPool::invalid(_("HSync range"));
         } elseif ($this->acl_is_writeable("gotoXHsync")){
           list($v1,$v2)= preg_split ("/[-+]/", $val);
           if ($v2 != ""){
             if ($v1 > $v2){
-              $message[]= _("Please specify a valid HSync range.");
+              $message[]= msgPool::invalid(_("HSync range"));
             }
           }
         }
@@ -606,7 +596,7 @@ class termservice extends plugin
     } else {
       foreach( array(
           "ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
-          "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc",  "nv", "nvidia",
+          "i128", "i740", "i810", "intel", "imstt", "mga", "neomagic", "newport", "nsc",  "nv", "nvidia",
           "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
           "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware") as $driver){
         $drivers[] = $driver;
@@ -635,8 +625,8 @@ class termservice extends plugin
             "gotoXDriver"             => _("Gfx driver"),
             "gotoXResolution"         => _("Gfx resolution"),
             "gotoXColordepth"         => _("Gfx color depth"),
-            "gotoXHsync"              => _("Hsync"),
-            "gotoXVsync"              => _("Vsync"),
+            "gotoXHsync"              => _("HSync"),
+            "gotoXVsync"              => _("VSync"),
             "AutoSync"                => _("Auto-Sync"),
             "gotoLpdEnable"           => _("Printer service enabled"),
             "gotoLpdServer"           => _("Spool server"),