summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd451ec)
raw | patch | inline | side by side (parent: dd451ec)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Nov 2007 07:14:30 +0000 (07:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Nov 2007 07:14:30 +0000 (07:14 +0000) |
- Terminal-/Workstationservice
If /etc/gosa/xdriver extists, read drivers from file.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7797 594d385d-05f5-0310-b6e9-bd551577e9d8
If /etc/gosa/xdriver extists, read drivers from file.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7797 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 5199369f53089d86d186340f5c74c4a564701f59..32c8d207ad3279c8b194b7081ae5edd1e08ae11e 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(
$this->handle_post_events("modify");
}
+
+ 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);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 5fac20be904db2e44264ab09bc29654e833c4613..c31d976bacf35b4d36aba3959289031246c3ab56 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()
+ {
+ $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);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: