Code

Fixed undefined index
[gosa.git] / plugins / admin / groups / class_groupApplication.inc
index 7024f1a491f72a4a5091cbb0dcd4b8ce67038c4b..f789dc9f70a35be5713b1f70a4fcf0df2b14e369 100644 (file)
@@ -187,51 +187,54 @@ class appgroup extends plugin
     /* Only diff if it is required 
      */
     $ret =array();
-  
+
     /* If current release has changed */
     if($this->FAIrelease != $this->InitialFAIrelease){
-  
+
       /* Walk through all apps which are currently displayed */
-      foreach($this->gosaMemberApplication[$this->curCatDir] as $entry){
+      if(isset($this->gosaMemberApplication[$this->curCatDir])){
 
-        /* If application is also available in new release, check if parameter differs */
-        if(in_array($entry['App'],$this->AllAppsForRelease)){ 
+        foreach($this->gosaMemberApplication[$this->curCatDir] as $entry){
 
-          $old = array();   // Old application parameter
-          $new = array();   // New parameters 
+          /* If application is also available in new release, check if parameter differs */
+          if(in_array($entry['App'],$this->AllAppsForRelease)){ 
 
-          /* There are possibly no parameters specified */
-          if(isset($this->AllAppsForReleaseParameter[$this->InitialFAIrelease][$entry['App']])){
-            $old = $this->AllAppsForReleaseParameter[$this->InitialFAIrelease][$entry['App']];
-          }
+            $old = array();   // Old application parameter
+            $new = array();   // New parameters 
 
-          if(isset($this->AllAppsForReleaseParameter[$this->FAIrelease][$entry['App']])){
-            $new = $this->AllAppsForReleaseParameter[$this->FAIrelease][$entry['App']];
-          }
+            /* There are possibly no parameters specified */
+            if(isset($this->AllAppsForReleaseParameter[$this->InitialFAIrelease][$entry['App']])){
+              $old = $this->AllAppsForReleaseParameter[$this->InitialFAIrelease][$entry['App']];
+            }
 
-          /*  Both (old & new) have no gosaApplicationParameter
-           */
-          if((!isset($old['gosaApplicationParameter'])) && (!isset($new['gosaApplicationParameter']))){
-            $ret[$entry['App']] = false; 
+            if(isset($this->AllAppsForReleaseParameter[$this->FAIrelease][$entry['App']])){
+              $new = $this->AllAppsForReleaseParameter[$this->FAIrelease][$entry['App']];
+            }
 
-            /* Both got gosaApplicationParameter
+            /*  Both (old & new) have no gosaApplicationParameter
              */
-          }elseif((isset($old['gosaApplicationParameter'])) && (isset($new['gosaApplicationParameter']))){
-            if(array_differs($old['gosaApplicationParameter'],$new['gosaApplicationParameter'])){
-              $ret[$entry['App']]  = true;
-            }else{
-              $ret[$entry['App']]  = false;
+            if((!isset($old['gosaApplicationParameter'])) && (!isset($new['gosaApplicationParameter']))){
+              $ret[$entry['App']] = false; 
+
+              /* Both got gosaApplicationParameter
+               */
+            }elseif((isset($old['gosaApplicationParameter'])) && (isset($new['gosaApplicationParameter']))){
+              if(array_differs($old['gosaApplicationParameter'],$new['gosaApplicationParameter'])){
+                $ret[$entry['App']]  = true;
+              }else{
+                $ret[$entry['App']]  = false;
+              }
             }
-          }
-          /* Initialy had gosaApplicationParameter bot in new release not 
-           */
-        }elseif((isset($old['gosaApplicationParameter'])) && (!isset($new['gosaApplicationParameter']))){
-          $ret[$entry['App']]  = true;
+            /* Initialy had gosaApplicationParameter bot in new release not 
+             */
+          }elseif((isset($old['gosaApplicationParameter'])) && (!isset($new['gosaApplicationParameter']))){
+            $ret[$entry['App']]  = true;
 
-          /* Old release had no gosaApplicationParameter but new got some
-           */
-        }elseif((!isset($old['gosaApplicationParameter'])) && (isset($new['gosaApplicationParameter']))){
-          $ret[$entry['App']]  = true;
+            /* Old release had no gosaApplicationParameter but new got some
+             */
+          }elseif((!isset($old['gosaApplicationParameter'])) && (isset($new['gosaApplicationParameter']))){
+            $ret[$entry['App']]  = true;
+          }
         }
       }
     }