Code

Added resolution hook results to WS & Terminal service
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 11:35:46 +0000 (11:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 11:35:46 +0000 (11:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3427 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalService.inc
plugins/admin/systems/class_workstationService.inc

index 27caf1a013c288a7e02c2fe58108c2ab3e064ab3..5a8018c615d9f353d0af11263cca083927a99765 100644 (file)
@@ -78,6 +78,24 @@ class termservice extends plugin
         "1400x1050" =>  "1400x1050",
         "1600x1200" =>  "1600x1200");
 
+    if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
+      $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
+
+      if(is_readable($file)){
+        $str = file_get_contents($file);
+        $lines = split("\n",$str);
+        foreach($lines as $line){
+          $line = trim($line);
+          if(!empty($line)){
+            $this->XResolutions[$line]=$line;
+          }
+        }
+        //natcasesort($this->gotoXResolutions);
+      }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));
+      }
+    }
+
     $this->XColordepths= array(
         "default"  => "["._("inherited")."]",
         "8"        => "8 " ._("bit"),
index 315df0e52748dc72c9dd14bb18778ef87b562aa0..340091fdedc5de08054af2fec3aceaf9a404d6a4 100644 (file)
@@ -72,6 +72,25 @@ class workservice extends plugin
         "1400x1050" =>  "1400x1050", 
         "1600x1200" =>  "1600x1200");
 
+    if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
+      $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
+
+      if(is_readable($file)){
+        $str = file_get_contents($file);
+        $lines = split("\n",$str);
+        foreach($lines as $line){
+          $line = trim($line);
+          if(!empty($line)){
+            $this->XResolutions[$line]=$line;
+          }
+        }
+        //natcasesort($this->gotoXResolutions);
+      }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));
+      }
+    }
+
+
     array_unshift($this->XDrivers, "["._("unknown")."]");
   
     $this->XColordepths= array(