summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a27e4a5)
raw | patch | inline | side by side (parent: a27e4a5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Nov 2007 07:17:08 +0000 (07:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Nov 2007 07:17:08 +0000 (07:17 +0000) |
- Read Xdrivers from file (/etc/gosa/xdrivers)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7798 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7798 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_terminalService.inc | patch | blob | history | |
plugins/admin/systems/class_workstationService.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index 1bd89391911f1d88f701ac9b895f405f662c7b25..db898e17eacb6fd00d0ca606c7afffd4803c4c6b 100644 (file)
var $cn= "";
var $orig_dn= "";
var $XMethods= array();
- var $XDrivers= array("ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
- "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv", "nvidia",
- "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
- "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
+ var $XDrivers= array();
var $XResolutions= array();
var $XColordepths= array();
var $XKbModels= array ();
function termservice (&$config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
-
+
+ /* Get list of available xdrivers */
+ $this->XDrivers = $this->getListOfXDrivers();
array_unshift($this->XDrivers, "["._("unknown")."]");
$this->XResolutions= array(
}
-/* Return plugin informations for acl handling */
+ function getListOfXDrivers()
+ {
+ $drivers = array();
+
+ /* Generate list of xdrivers from from CONFIG_DIR./xdrivers */
+ if (file_exists(CONFIG_DIR.'/xdrivers')){
+ $xdrivers = file (CONFIG_DIR.'/xdrivers');
+ foreach ($xdrivers as $line){
+ if (!preg_match ("/^#/", $line)){
+ $drivers[]= trim($line);
+ }
+ }
+ } else {
+ $drivers = array("ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
+ "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv", "nvidia",
+ "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
+ "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
+ }
+ return($drivers);
+ }
+
+
+ /* Return plugin informations for acl handling */
function plInfo()
{
return (array(
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index eb6900384ba0c6fc06f3894e77a10e5e0a1c312e..642cce63f8301ff75fd9a0b39537bc5607a25b8f 100644 (file)
var $cn= "";
var $orig_dn= "";
var $XMethods= array();
- var $XDrivers= array("ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
- "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv", "nvidia",
- "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
- "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
-
+ var $XDrivers= array();
var $XResolutions = array();
-
var $MouseTypes= array();
var $MousePorts= array();
var $hardware_list= array();
}
}
+ /* Get list of available xdrivers */
+ $this->XDrivers = $this->getListOfXDrivers();
+
array_unshift($this->XDrivers, "["._("unknown")."]");
$this->XColordepths= array(
$this->handle_post_events("modify");
}
+
+ function getListOfXDrivers()
+ {
+ /* Generate list of xdrivers from from CONFIG_DIR./xdrivers */
+ $drivers = array();
+ if (file_exists(CONFIG_DIR.'/xdrivers')){
+ $xdrivers = file (CONFIG_DIR.'/xdrivers');
+ foreach ($xdrivers as $line){
+ if (!preg_match ("/^#/", $line)){
+ $drivers[]= trim($line);
+ }
+ }
+ } else {
+ $drivers = array("ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
+ "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv", "nvidia",
+ "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
+ "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
+ }
+ return($drivers);
+ }
+
+
/* Return plugin informations for acl handling */
function plInfo()
{