diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 54af9393d7f4567a411d4a39d24d587c35b5c3a4..51982ff1f7d2e3384742c9ee2bc808869bceda72 100644 (file)
var $cn= "";
var $orig_dn= "";
var $XMethods= array();
- var $XDrivers= array("ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev",
- "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv",
- "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()
+ {
+ $drivers = array();
+
+ /* Generate a list of xdrivers 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);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: