summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c8af22)
raw | patch | inline | side by side (parent: 6c8af22)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Apr 2006 04:10:28 +0000 (04:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Apr 2006 04:10:28 +0000 (04:10 +0000) |
If object base changed, releases must be detected again.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2997 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2997 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupApplication.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index 4727a3ea3d736320f2dd2625108c673f91e273c1..5a7da640653e128e4c53dc6934a9dd6d665df9c1 100644 (file)
$tmp = search_config($this->config->data,"faiManagement","CLASS");
if(!empty($tmp)){
- $tmp = array_flip($this->getReleases());
+ $tmp = array_flip($this->getReleases($this->parent->by_object['group']->base));
$base = $tmp[$this->Release];
$ldap->cd($this->config->current['BASE']);
$smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
if($this->enableReleaseManagement){
- $smarty->assign("Release", $this->Release);
-
- $tmp = $this->getReleases();
-
- $smarty->assign("Releases", $tmp);
+ $smarty->assign("Release", $this->Release);
+ $tmp = $this->getReleases($this->parent->by_object['group']->base);
+ $smarty->assign("Releases", $tmp);
if(count($this->used_apps)){
$smarty->assign("ReleaseSelectAble", false);
return ($display);
}
- function getReleases()
- {
-
- if(isset($this->base)){
- $base = $this->base;
- }else{
- $base = $this->parent->by_object['group']->base;
- }
+ function getReleases($base)
+ {
$dn = "ou=apps,".$base;
+
$ret = array();
$ret ["ou=apps,".$base] = "/";
$val = trim(preg_replace("/,/","",$val));
if(empty($val)) break;
$str .= "/".$val;
- }
+ }
if(!empty($str)){
$ret[$attrs['dn']]= preg_replace("/^\//","",$str);
}
}
return($ret);
}
-
+
function save_object()
{
if(isset($_POST ['Release'])){
if(!empty($tmp)){
$this->enableReleaseManagement = true;
- $tmp = array_flip($this->getReleases());
+ $tmp = array_flip($this->getReleases($this->parent->by_object['group']->base));
if(isset($tmp[$this->Release])){
$base = $tmp[$this->Release];
}else{
-
$k = key($tmp);
$r = $tmp[$k];
-
- print_red(sprintf(_("Can't resolve the release name '%s', setting release name to '%s'. "),$this->Release,$k));
$this->Release = $k;
$base = $r;
+
+ print_red(sprintf(_("Can't resolve the release name '%s', setting release name to '%s'. Possibly the objects base has changed."),$this->Release,$k));
}
$base = preg_replace("/ou=apps,.*$/","ou=apps,".$this->curbase,$base);