From: hickert Date: Tue, 30 Mar 2010 06:41:32 +0000 (+0000) Subject: Updated Release handling in fai Management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0542f31e20fcb5f42e9dd41d233fd64539270fb6;p=gosa.git Updated Release handling in fai Management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17372 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 6ed3e961e..caae4b9a9 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -643,14 +643,24 @@ class faiManagement extends management } /* Post remove */ - $this->fai_release = $this->fai_base; + $this->fai_release = preg_replace("/^[^,]*+,/","", $this->fai_release); + $this->lock_name = $name; $this->lock_dn = $bb; $this->handle_post_events('remove'); - $fai_filter = session::get("fai_filter"); - $fai_filter['fai_release'] = $this->fai_release; - session::set("fai_filter",$fai_filter); + // Update list and release selector to point to a valid release again. + $releases = $this->getReleaseList(); + if(!isset($releases[$this->fai_releaes])){ + $this->fai_release = $this->fai_base; + } + + $headpage = $this->getHeadpage(); + $headpage->setBase($this->fai_release); + $headpage->update(); + + $this->releaseSelector->setBases($releases); + $this->releaseSelector->setBase($this->fai_release); new log("remove","fai/".get_class($this),$br[$bb],array(),"Release removed"); } @@ -856,10 +866,16 @@ class faiManagement extends management "Daemon events called but classes where not accessible, DaemonEvent gosaSupportDaemon", FATAL_ERROR_DIALOG); } - + + // Update list and release selector to point to the newly created release + $headpage = $this->getHeadpage(); + $this->fai_release = $targetReleaseDN; + $headpage->setBase($this->fai_release); + $headpage->update(); + $releases = $this->getReleaseList(); $this->releaseSelector->setBases($releases); - $this->releaseSelector->setBase($targetReleaseDN); + $this->releaseSelector->setBase($this->fai_release); exit(); } } diff --git a/gosa-plugins/fai/admin/fai/fai-list.xml b/gosa-plugins/fai/admin/fai/fai-list.xml index db32326a5..792cb4d28 100644 --- a/gosa-plugins/fai/admin/fai/fai-list.xml +++ b/gosa-plugins/fai/admin/fai/fai-list.xml @@ -104,23 +104,38 @@ remove_multiple entry images/lists/trash.png - + + + + + separator createBranch entry - images/lists/element.png[new] + plugins/fai/images/branch_small.png[new] createFreeze entry - images/lists/element.png[new] + plugins/fai/images/freeze.png[new] + + removeBranch + entry + images/lists/trash.png + + + + + separator + + exporter