Code

Fixed undefined index in line 171 if app parameter has changed in newer releases
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Apr 2006 04:22:13 +0000 (04:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Apr 2006 04:22:13 +0000 (04:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3082 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc

index f255c697e4e5ad8b03eca82dc83e3c59872e27f1..d45a62638e6bf6b26de1d91c19e214ea2cc076e0 100644 (file)
@@ -165,11 +165,27 @@ class appgroup extends plugin
     /* Only diff if it is required 
      */
     $ret =array();
+  
+    /* If current release has changed */
     if($this->Release != $this->InitialRelease){
+  
+      /* Walk through all apps which are currently displayed */
       foreach($this->gosaMemberApplication[$this->curCatDir] as $entry){
+
+        /* If application is also available in new release, check if parameter differs */
         if(in_array($entry['App'],$this->AllAppsForRelease)){ 
-          $old = $this->AllAppsForReleaseParameter[$this->InitialRelease][$entry['App']];
-          $new = $this->AllAppsForReleaseParameter[$this->Release][$entry['App']];
+
+          $old = array();   // Old application parameter
+          $new = array();   // New parameters 
+
+          /* There are possibly no parameters specified */
+          if(isset($this->AllAppsForReleaseParameter[$this->InitialRelease][$entry['App']])){
+            $old = $this->AllAppsForReleaseParameter[$this->InitialRelease][$entry['App']];
+          }
+
+          if(isset($this->AllAppsForReleaseParameter[$this->Release][$entry['App']])){
+            $new = $this->AllAppsForReleaseParameter[$this->Release][$entry['App']];
+          }
 
           /*  Both (old & new) have no gosaApplicationParameter
            */
@@ -178,13 +194,13 @@ class appgroup extends plugin
 
             /* 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;
+          }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']))){