* InfoLog: subentries are now shown only in hierarchical view and updates to them also update modification time of parent

This commit is contained in:
Ralf Becker 2014-08-27 07:53:40 +00:00
parent 7948b17745
commit bdc8b5bd01
2 changed files with 4 additions and 4 deletions

View File

@ -686,7 +686,7 @@ class infolog_so
'event' => 'calendar' 'event' => 'calendar'
); );
// query children independent of action // query children independent of action
if (empty($query['col_filter']['info_id_parent'])) if ((string)$query['col_filter']['info_id_parent'] === '')
{ {
$action = isset($action2app[$query['action']]) ? $action2app[$query['action']] : $query['action']; $action = isset($action2app[$query['action']]) ? $action2app[$query['action']] : $query['action'];
if ($action) if ($action)
@ -748,7 +748,7 @@ class infolog_so
continue; continue;
} }
if ($col[0] != '#' && substr($col,0,5) != 'info_' && isset($table_def['fd']['info_'.$col])) $col = 'info_'.$col; if ($col[0] != '#' && substr($col,0,5) != 'info_' && isset($table_def['fd']['info_'.$col])) $col = 'info_'.$col;
if (!empty($data) && preg_match('/^[a-z_0-9]+$/i',$col)) if ((string)$data !== '' && preg_match('/^[a-z_0-9]+$/i',$col))
{ {
switch ($col) switch ($col)
{ {

View File

@ -281,7 +281,7 @@ class infolog_ui
if (!$query['csv_export']) if (!$query['csv_export'])
{ {
unset($query['no_actions']); unset($query['no_actions']);
$parent_id = $query['col_filter']['parent_id']; $parent_id = (int)$query['col_filter']['parent_id'];
unset($query['col_filter']['parent_id']); unset($query['col_filter']['parent_id']);
if(!$query['action']) if(!$query['action'])
{ {
@ -295,7 +295,7 @@ class infolog_ui
$query['action_var'] = 'multi_action'; // as 'action' is already used in infolog $query['action_var'] = 'multi_action'; // as 'action' is already used in infolog
} }
$orginal_colfilter = $query['col_filter']; $orginal_colfilter = $query['col_filter'];
if (isset($parent_id)) $query['col_filter']['info_id_parent'] = (int)$parent_id; if (isset($parent_id)) $query['col_filter']['info_id_parent'] = (string)$parent_id;
//echo "<p>infolog_ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).",sort=$query[sort],order=$query[order])</p>\n"; //echo "<p>infolog_ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).",sort=$query[sort],order=$query[order])</p>\n";
if (!isset($query['start'])) $query['start'] = 0; if (!isset($query['start'])) $query['start'] = 0;