mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-12 00:10:37 +01:00
create unaccessible / not returned folders on the fly
This commit is contained in:
parent
a24508fa34
commit
8f7f719fab
@ -335,6 +335,7 @@ class mail_ui
|
|||||||
$oA['child']=1; // translates to: hasChildren -> dynamicLoading
|
$oA['child']=1; // translates to: hasChildren -> dynamicLoading
|
||||||
}
|
}
|
||||||
$oA['parent'] = $parentName;
|
$oA['parent'] = $parentName;
|
||||||
|
|
||||||
$this->setOutStructure($oA,$out,$obj->delimiter);
|
$this->setOutStructure($oA,$out,$obj->delimiter);
|
||||||
$c++;
|
$c++;
|
||||||
}
|
}
|
||||||
@ -347,9 +348,10 @@ class mail_ui
|
|||||||
* @param array $data, data to be processed
|
* @param array $data, data to be processed
|
||||||
* @param array &$out, out array
|
* @param array &$out, out array
|
||||||
* @param string $del='.', needed as glue for parent/child operation / comparsion
|
* @param string $del='.', needed as glue for parent/child operation / comparsion
|
||||||
|
* @param boolean $createMissingParents=true create a missing parent, instead of throwing an exception
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function setOutStructure($data, &$out, $del='.')
|
function setOutStructure($data, &$out, $del='.', $createMissingParents=true)
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__."(".array2string($data).', '.array2string($out).", '$del')");
|
//error_log(__METHOD__."(".array2string($data).', '.array2string($out).", '$del')");
|
||||||
$components = $data['path'];
|
$components = $data['path'];
|
||||||
@ -370,7 +372,20 @@ class mail_ui
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($item['id'] != $parent.$component) throw new egw_exception_assertion_failed(__METHOD__.':'.__LINE__.": id=$data[id]: Parent '$parent' '$component' not found!");
|
if ($item['id'] != $parent.$component)
|
||||||
|
{
|
||||||
|
if ($createMissingParents)
|
||||||
|
{
|
||||||
|
unset($item);
|
||||||
|
$item = array('id' => $parent.$component, 'text' => $component, 'tooltip' => '**missing**');
|
||||||
|
$insert['item'][] =& $item;
|
||||||
|
$insert =& $item;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new egw_exception_assertion_failed(__METHOD__.':'.__LINE__.": id=$data[id]: Parent '$parent' '$component' not found!");
|
||||||
|
}
|
||||||
|
}
|
||||||
$parents[] = $component;
|
$parents[] = $component;
|
||||||
}
|
}
|
||||||
unset($data['path']);
|
unset($data['path']);
|
||||||
|
Loading…
Reference in New Issue
Block a user