Configured Columns which are not defined will be automatically hidden now

This commit is contained in:
Andre Lorbach 2008-05-19 13:10:38 +02:00
parent 146bd75a09
commit 3ed6e69ea8

View File

@ -201,16 +201,19 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
// --- Init the fields we need
foreach($content['Columns'] as $mycolkey)
{
$content['fields'][$mycolkey]['FieldID'] = $mycolkey;
$content['fields'][$mycolkey]['FieldCaption'] = $content[ $fields[$mycolkey]['FieldCaptionID'] ];
$content['fields'][$mycolkey]['FieldType'] = $fields[$mycolkey]['FieldType'];
$content['fields'][$mycolkey]['FieldSortable'] = $stream->IsPropertySortable($mycolkey); // $fields[$mycolkey]['Sortable'];
$content['fields'][$mycolkey]['DefaultWidth'] = $fields[$mycolkey]['DefaultWidth'];
if ( isset($fields[$mycolkey]) )
{
$content['fields'][$mycolkey]['FieldID'] = $mycolkey;
$content['fields'][$mycolkey]['FieldCaption'] = $content[ $fields[$mycolkey]['FieldCaptionID'] ];
$content['fields'][$mycolkey]['FieldType'] = $fields[$mycolkey]['FieldType'];
$content['fields'][$mycolkey]['FieldSortable'] = $stream->IsPropertySortable($mycolkey); // $fields[$mycolkey]['Sortable'];
$content['fields'][$mycolkey]['DefaultWidth'] = $fields[$mycolkey]['DefaultWidth'];
if ( $mycolkey == SYSLOG_MESSAGE )
$content['fields'][$mycolkey]['colspan'] = ''; //' colspan="2" ';
else
$content['fields'][$mycolkey]['colspan'] = '';
if ( $mycolkey == SYSLOG_MESSAGE )
$content['fields'][$mycolkey]['colspan'] = ''; //' colspan="2" ';
else
$content['fields'][$mycolkey]['colspan'] = '';
}
}
// ---
@ -291,7 +294,7 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
// --- Now we populate the values array!
foreach($content['Columns'] as $mycolkey)
{
if ( isset($logArray[$mycolkey]) )
if ( isset($fields[$mycolkey]) && isset($logArray[$mycolkey]) )
{
// Set defaults
$content['syslogmessages'][$counter]['values'][$mycolkey]['FieldColumn'] = $mycolkey;