summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7792b52)
raw | patch | inline | side by side (parent: 7792b52)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Feb 2008 09:49:33 +0000 (09:49 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Feb 2008 09:49:33 +0000 (09:49 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8812 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/groups/apps/app_list.tpl | patch | blob | history | |
gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/groups/apps/app_list.tpl b/gosa-plugins/goto/admin/groups/apps/app_list.tpl
index 0cb597952cdeef49b640d0fd40bc2558ce28362e..15279907db31c180e23d5aee8ec6af8936c37b4f 100644 (file)
<table style="width:100%;">
+ {if $enableReleaseManagement}
<tr>
<td>
{t}Release{/t}
</select>
</td>
</tr>
+ {/if}
<tr>
<td style="width:50%; vertical-align:top;">
<div style="height:290px; overflow:auto;
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc
index 276bbfddb4e111ccbf6c4c36069bbaef933c5504..fa4f90afc586e6a63152d6ac4eaeb8fa558e572f 100644 (file)
var $app_parameter = array();
var $edit_entry = array();
+ var $enableReleaseManagement = FALSE;
public function __construct(&$config, $dn= NULL, $parent= NULL)
{
$this->enableReleaseManagement = true;
}
- /* Get required release informations */
- if($this->enableReleaseManagement){
- $this->Releases = $this->getReleases();
- $this->FAIrelease = 0;
- }
+ $this->FAIrelease = 0;
+ $this->Releases = $this->getReleases();
$this->curbase = $this->config->current['BASE'];
$this->reload();
}
*/
function getReleases()
{
- /* Only display those releases that we are able to read */
- $dn = $this->config->current['BASE'];
- $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))";
- $res = get_list($filter,"application", $dn, array("ou","FAIstate"), GL_SUBSEARCH);
-
$ret =array(array("name" => "/" , "parts" => array(),"suffix" => get_ou('applicationou')));
- foreach($res as $attrs){
- if(preg_match("/".get_ou('applicationou')."/",$attrs['dn'])){
- $bb = preg_replace("/".get_ou('applicationou').".*/","",$attrs['dn']);
- $parts = array_reverse(split("ou=",$bb));
-
- $str ="";
- foreach($parts as $key => $part){
- if(empty($part)) {
- unset($parts[$key]);
- continue;
+ if($this->enableReleaseManagement){
+
+ /* Only display those releases that we are able to read */
+ $dn = $this->config->current['BASE'];
+ $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))";
+ $res = get_list($filter,"application", $dn, array("ou","FAIstate"), GL_SUBSEARCH);
+
+ foreach($res as $attrs){
+ if(preg_match("/".get_ou('applicationou')."/",$attrs['dn'])){
+ $bb = preg_replace("/".get_ou('applicationou').".*/","",$attrs['dn']);
+ $parts = array_reverse(split("ou=",$bb));
+
+ $str ="";
+ foreach($parts as $key => $part){
+ if(empty($part)) {
+ unset($parts[$key]);
+ continue;
+ }
+ $part = str_replace(",","",$part);
+ $str .= $part."/";
+ $parts[$key] = $part;
}
- $part = str_replace(",","",$part);
- $str .= $part."/";
- $parts[$key] = $part;
- }
- $name = preg_replace("/\/$/","",$str);
- if(empty($name)) {
- $name ="/";
- }
- $FAIstate = "";
- if(isset($attrs['FAIstate'])){
- $FAIstate = $attrs['FAIstate'][0];
+ $name = preg_replace("/\/$/","",$str);
+ if(empty($name)) {
+ $name ="/";
+ }
+ $FAIstate = "";
+ if(isset($attrs['FAIstate'])){
+ $FAIstate = $attrs['FAIstate'][0];
+ }
+
+ $ret[$name] = array("name" => $name,
+ "FAIstate" => $FAIstate,
+ "dn" => $attrs['dn'],
+ "parts" => $parts,"suffix" => $bb.get_ou('applicationou'));
}
-
- $ret[$name] = array("name" => $name,
- "FAIstate" => $FAIstate,
- "dn" => $attrs['dn'],
- "parts" => $parts,"suffix" => $bb.get_ou('applicationou'));
}
}
ksort($ret);
}
}
}elseif(in_array("FAIbranch",$attrs['objectClass'])){
+
$type = "RELEASE";
if(isset($attrs['FAIstate'][0])){
$data['FAIstate'] = $attrs['FAIstate'][0];
}
+ $smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
$smarty->assign("FAIrelease",$this->FAIrelease);
$smarty->assign("app_list",$div->DrawList());
$smarty->assign("releases",$this->Releases);