mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
previous version was a mess. It generated a HUGE html document because I forgot to flush the vars before I kept adding to them
This commit is contained in:
parent
e5e315711c
commit
70f546278c
@ -281,9 +281,16 @@
|
|||||||
$data[1][0] = ereg_replace ("@", "@#", $data[1][0]);
|
$data[1][0] = ereg_replace ("@", "@#", $data[1][0]);
|
||||||
$returndata = parseobject($data[1][0], $fn);
|
$returndata = parseobject($data[1][0], $fn);
|
||||||
if ($startstop[$key] == 'some_lame_string_that_wont_be_used_by_a_function')
|
if ($startstop[$key] == 'some_lame_string_that_wont_be_used_by_a_function')
|
||||||
|
{
|
||||||
|
if (!is_array($doc_array['file '.$fn][0]['files']))
|
||||||
|
{
|
||||||
|
$doc_array['file '.$fn][0]['files'] = Array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($fn,$doc_array['file '.$fn][0]['files']))
|
||||||
{
|
{
|
||||||
$doc_array['file '.$fn][0]['files'][] = $fn;
|
$doc_array['file '.$fn][0]['files'][] = $fn;
|
||||||
$doc_array['file '.$fn][0]['files'] = array_unique($doc_array['file '.$fn][0]['files']);
|
}
|
||||||
$doc_array['file '.$fn][$returndata['name']] = $returndata['value'];
|
$doc_array['file '.$fn][$returndata['name']] = $returndata['value'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -292,16 +299,28 @@
|
|||||||
{
|
{
|
||||||
$returndoc = parsesimpleobject($matches_starts[$startstop[$key]]);
|
$returndoc = parsesimpleobject($matches_starts[$startstop[$key]]);
|
||||||
if ($returndoc != False)
|
if ($returndoc != False)
|
||||||
|
{
|
||||||
|
if (!is_array($returndoc['value']['files']))
|
||||||
|
{
|
||||||
|
$returndoc['value']['files'] = Array();
|
||||||
|
}
|
||||||
|
if (!in_array($fn, $returndoc['value']['files']))
|
||||||
{
|
{
|
||||||
$returndoc['value']['files'][] = $fn;
|
$returndoc['value']['files'][] = $fn;
|
||||||
$returndoc['value']['files'] = array_unique($returndoc['value']['files']);
|
}
|
||||||
}
|
}
|
||||||
$doc_array[$startstop[$key]][0] = $returndoc['value'];
|
$doc_array[$startstop[$key]][0] = $returndoc['value'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!is_array($doc_array[$startstop[$key]][0]['files']))
|
||||||
|
{
|
||||||
|
$doc_array[$startstop[$key]][0]['files'] = Array();
|
||||||
|
}
|
||||||
|
if (!in_array($fn, $doc_array[$startstop[$key]][0]['files']))
|
||||||
{
|
{
|
||||||
$doc_array[$startstop[$key]][0]['files'][] = $fn;
|
$doc_array[$startstop[$key]][0]['files'][] = $fn;
|
||||||
$doc_array[$startstop[$key]][0]['files'] = array_unique($doc_array[$startstop[$key]][0]['files']);
|
}
|
||||||
}
|
}
|
||||||
$doc_array[$startstop[$key]][$returndata['name']] = $returndata['value'];
|
$doc_array[$startstop[$key]][$returndata['name']] = $returndata['value'];
|
||||||
}
|
}
|
||||||
@ -341,17 +360,22 @@
|
|||||||
{
|
{
|
||||||
while(list($docline_key, $docline_value) = each($object_value))
|
while(list($docline_key, $docline_value) = each($object_value))
|
||||||
{
|
{
|
||||||
|
|
||||||
$GLOBALS['template']->set_var('generic_name',$docline_key);
|
$GLOBALS['template']->set_var('generic_name',$docline_key);
|
||||||
$GLOBALS['template']->set_var('generic_value',$docline_value[0]);
|
$GLOBALS['template']->set_var('generic_value',$docline_value[0]);
|
||||||
$GLOBALS['template']->fp('object_contents','generic',True);
|
$GLOBALS['template']->fp('object_contents','generic',True);
|
||||||
}
|
}
|
||||||
|
$GLOBALS['template']->set_var('generic_name',$docline_key);
|
||||||
|
$GLOBALS['template']->set_var('generic_value',$docline_value[0]);
|
||||||
$GLOBALS['template']->fp('group_contents','object',True);
|
$GLOBALS['template']->fp('group_contents','object',True);
|
||||||
|
$GLOBALS['template']->set_var('object_contents','');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$GLOBALS['template']->fp('doc','group',True);
|
$GLOBALS['template']->fp('doc','group',True);
|
||||||
|
$GLOBALS['template']->set_var('group_contents','');
|
||||||
}
|
}
|
||||||
$GLOBALS['template']->fp('doc','border_bottom',True);
|
$GLOBALS['template']->fp('doc','border_bottom',True);
|
||||||
$GLOBALS['template']->pfp('out', 'doc');
|
$GLOBALS['template']->pfp('out', 'doc');
|
||||||
|
echo '<a name="array">';
|
||||||
array_print($doc_array);
|
array_print($doc_array);
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user