Code

Do not display any license stuff until the gosaSupportDaemon is configured.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Jan 2010 12:56:52 +0000 (12:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Jan 2010 12:56:52 +0000 (12:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15107 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_filterOpsiLicense.inc

index e2998f61a782c635dc9c192ab0ee98dfa401f7b9..10d0e19588d7a5eacac7645da3e993cc11ebae2d 100644 (file)
@@ -4,6 +4,9 @@ class filterOpsiLicense {
 
   static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
   {
+
+    if(!class_available('opsi')) return(array());
+
     $config= session::global_get('config');
     $ldap= $config->get_ldap_link(TRUE);
     $flag= ($scope == "sub")?GL_SUBSEARCH:0;
@@ -25,6 +28,9 @@ class filterOpsiLicense {
   {
     $config= session::global_get('config');
     $si = new opsiLicenceHandler($config);
+
+    if(!$si->enabled()) return(array());
+
     $res = $si->listPools();
     $result = array();
     if($si->is_error() || !is_array($res)){