summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5822654)
raw | patch | inline | side by side (parent: 5822654)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Mar 2010 06:58:08 +0000 (06:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Mar 2010 06:58:08 +0000 (06:58 +0000) |
-This enables us to use this method in Applications and Mimtypes too
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17374 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17374 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index caae4b9a9c88770c194d2610130ae8c8616307a0..bc2c786ae6b45735835760ba85ec96845fa7c48b 100644 (file)
$this->registerAction("saveBranch","saveBranch");
$this->registerAction("PerformBranch","PerformBranch");
+ $releases = $this->getReleaseStates($this->config,$this->fai_base);
$this->releaseSelector = new releaseSelector($releases, $this->fai_release, $this->fai_release);
parent::__construct($config, $ui, "FAI object", $headpage);
}
$this->handle_post_events('remove');
// Update list and release selector to point to a valid release again.
- $releases = $this->getReleaseList();
+ $releases = $this->getReleaseStates($this->config,$this->fai_base);
if(!isset($releases[$this->fai_releaes])){
$this->fai_release = $this->fai_base;
}
$headpage->setBase($this->fai_release);
$headpage->update();
- $releases = $this->getReleaseList();
+ $releases = $this->getReleaseStates($this->config,$this->fai_base);
$this->releaseSelector->setBases($releases);
$this->releaseSelector->setBase($this->fai_release);
exit();
$ldap = $this->config->get_ldap_link();
$ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate"));
-
while($release = $ldap->fetch()){
$list[$release['dn']] = $prefix.$release['ou'][0];
$list = array_merge($list,$this->getReleaseList($release['dn'],$prefix." "));
}
+ /*! \brief Returns a list of all releases for the releaseSelector
+ * ou=fai...
+ * ou=siga,ou=fai... "branch"
+ * ou=1,ou=siga,ou=fai... "freeze"
+ */
+ static function getReleaseStates($config,$base = "", $fai_base="")
+ {
+ $list = array();
+ if(empty($fai_base)){
+ $fai_base = $base;
+ $list[$base] = "";
+ }
+
+ $ldap = $config->get_ldap_link();
+ $ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate"));
+
+ while($release = $ldap->fetch()){
+ $list[$release['dn']] = _("Branch");
+ if(isset($release['FAIstate'][0]) && preg_match("/freeze/i",$release['FAIstate'][0])){
+ $list[$release['dn']] = _("Freeze");
+ }
+ $list = array_merge($list,faiManagement::getReleaseStates($config,$release['dn'], $fai_base));
+ }
+ return($list);
+ }
+
+
/*! \brief Returns a list of all releases with full release names
* ou=fai... /
* ou=siga,ou=fai... siga