From: hickert Date: Mon, 24 Apr 2006 04:22:13 +0000 (+0000) Subject: Fixed undefined index in line 171 if app parameter has changed in newer releases X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=744eb7611349c640d0c013613880828ca4ad5654;p=gosa.git Fixed undefined index in line 171 if app parameter has changed in newer releases git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3082 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index f255c697e..d45a62638 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -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']))){