summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf86950)
raw | patch | inline | side by side (parent: cf86950)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 11:02:28 +0000 (11:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 11:02:28 +0000 (11:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12965 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsi.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index 194297a80656b9589ea0448a5cb96167146e6aff..1ddd6959f576bba2f54a8d1c2ba36c456c9c8411 100644 (file)
/* Detect the target opsi host
*/
- $opsi_hosts = $this->get_hosts_with_module("opsi_com");
-
- /* Just use the first result of the opsi hosts
- */
- if(count($opsi_hosts) == 1 && isset($opsi_hosts[0])){
- $this->target = $opsi_hosts[0];
- }elseif(count($opsi_hosts) > 1){
- $this->target = $opsi_hosts[0];
- msg_dialog::display(_("Opsi"),sprintf(_("More than one Opsi server were found, using the first result '%s'."),$this->target));
+ $tmp= $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
+ if(!empty($tmp) && class_available("faiManagement")){
+ $opsi_hosts = $this->get_hosts_with_module("opsi_com");
+
+ /* Just use the first result of the opsi hosts
+ */
+ if(count($opsi_hosts) == 1 && isset($opsi_hosts[0])){
+ $this->target = $opsi_hosts[0];
+ }elseif(count($opsi_hosts) > 1){
+ $this->target = $opsi_hosts[0];
+ msg_dialog::display(_("Opsi"),sprintf(_("More than one Opsi server were found, using the first result '%s'."),$this->target));
+ }
}
}
public function enabled()
{
- return(!empty($this->target));
+ $tmp= $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
+ if(!empty($tmp) && class_available("faiManagement") && !empty($this->target)){
+ return(TRUE);
+ }
+ return(FALSE);
}