Code

Prepared for multiple asterisk servers
[gosa.git] / plugins / admin / fai / class_faiSummaryTab.inc
index ef61be6f67f38b2f72743df0780ef7d6ff887535..034f8cefe107b388f1f5a2a2cb6ee0acc628486e 100644 (file)
@@ -168,6 +168,14 @@ class faiSummaryTab extends plugin{
   /* This function calls all nescessary functions to generate the fai class summary tree */
   function execute() 
   {
+
+    /* Skip this if fai is deactivated */
+    $tmp = search_config($this->config->data,"faiManagement","CLASS");
+    if(empty($tmp)){
+      $str = "<h2>"._("You can't use this plugin until FAI is activated.")."</h2>";
+      return $str;
+    }    
+
     /* Check if we must (re)init the this tab */
     if(!$this->InitCalled){
       $this->init();
@@ -216,11 +224,12 @@ class faiSummaryTab extends plugin{
       
       $image = "<img src='".$this->objs[$key]['Image']."' class='center' alt='".$this->objs[$key]['Name']."' border=0>";
       if(!isset($entry['Open'])){
-        $str .= "<tr><td colspan=2>
-                    <a href='?plug=".$_GET['plug']."&amp;expand&amp;id=".$key."'>
-                  <img border=0 class='center' src='images/expand.png' alt='"._("Open")."'>&nbsp;";
-        $str .= $image."&nbsp;";
-        $str .= "<b>".$this->objs[$key]['Name']."</b></b></td></tr>";
+        $str .= "<tr>
+                  <td colspan=2>
+                   <a href='?plug=".$_GET['plug']."&amp;expand&amp;id=".$key."'>
+                    <img border=0 class='center' src='images/expand.png' alt='"._("Open")."'>&nbsp;";
+        $str .=     $image."&nbsp;";
+        $str .= "   <b>".$this->objs[$key]['Name']."</b></a></td></tr>";
       }else{
         $str .= "<tr><td colspan=2>
                     <a href='?plug=".$_GET['plug']."&amp;compress&amp;id=".$key."'>
@@ -375,11 +384,6 @@ class faiSummaryTab extends plugin{
     $dn                    = $this->Releases [$this->Release];
     $resolvedClasses  = get_all_objects_for_given_base($dn,"(&(objectClass=FAIclass)(cn=".$class."))");
 
-    /* Check acls -> are we allowed to view the config summary ? */
-    if(!$this->acl_is_readable("readable")) {
-      return;
-    }
-
     /* Try to fetch all types of fai objects with the given cn  */
     foreach($resolvedClasses as $obj){