summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a01eb8)
raw | patch | inline | side by side (parent: 5a01eb8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 11:35:54 +0000 (11:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 11:35:54 +0000 (11:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8778 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc
index 5d4b6dafd14b737330605439b6d037059c783d18..f3476f02bfcda98442aab7e6c2ecc9c93c9b0e72 100644 (file)
function _get_folder_names()
{
$data = $this->_get_entries_for_release($this->FAIrelease);
- $ret = array();
+ $ret = array("BASE" => ".");
foreach($data as $entry){
if($entry['TYPE'] == "FOLDER"){
$ret[$entry['UNIQID']] = $entry['NAME'];
}
return($ret);
}
+
function _get_entries_for_release($release,$cur = NULL)
{
- $release_info = $this->Releases[$release];
- $cur = &$this->a_Structure;
-
- $found = FALSE;
- foreach($release_info['parts'] as $name){
- foreach($cur as $key => $obj){
- if($obj['TYPE'] == "RELEASE" && $obj['NAME'] == $name){
- $cur = &$cur[$key]['ENTRIES'];
- $found = TRUE;
- break;
- }
- $found = FALSE;
- }
- }
- if($found){
- return($this->_get_all_entries(TRUE,TRUE,$cur));
- }else{
- return(array());
- }
+ $all = $this->_get_all_entries();
+ $key = $this->_get_release_key($release);
+ if(isset($all[$key])){
+ return($this->_get_all_entries(TRUE,TRUE,&$all[$key]['ENTRIES']));
+ }
+ return(array());
}
}
+ function _get_release_key($release)
+ {
+ $release_info = $this->Releases[$release];
+ $cur = &$this->a_Structure;
+ $s_key = "";
+ $found = FALSE;
+ foreach($release_info['parts'] as $name){
+ foreach($cur as $key => $obj){
+ if($obj['TYPE'] == "RELEASE" && $obj['NAME'] == $name){
+ $s_key = $cur[$key]['UNIQID'];
+ $cur = &$cur[$key]['ENTRIES'];
+ $found = TRUE;
+ break;
+ }
+ $found = FALSE;
+ }
+ }
+ if($found){
+ return($s_key);
+ }
+ return(FALSE);
+ }
+
+
function _add_sub_folder($folder,$name)
{
$all = $this->_get_all_entries();
+ if($folder == "BASE"){
+ $folder = $this->_get_release_key($this->FAIrelease);
+ }
+
if(isset($all[$folder])){
$a_folder = array();
$a_folder['STATUS'] = "ADDED";
function _add_entry($folder_id,$entry,$pos = 0)
{
$all = $this->_get_all_entries();
+
if(isset($all[$folder_id])){
$folder = &$all[$folder_id];
function _add_app_id($folder_id,$app_id)
{
$all = $this->_get_all_entries();
+ if($folder_id == "BASE"){
+ $folder_id = $this->_get_release_key($this->FAIrelease);
+ }
if(isset($all[$folder_id]) && isset($this->apps[$app_id])){
$new = array();