Get infolog list working in contact view

This commit is contained in:
Nathan Gray 2013-11-13 22:44:28 +00:00
parent 23f85e9763
commit 00a3290d97

View File

@ -706,6 +706,7 @@ class infolog_ui
if (!is_array($values)) if (!is_array($values))
{ {
$nm = egw_cache::getSession('infolog', $this->called_by.'session_data'); $nm = egw_cache::getSession('infolog', $this->called_by.'session_data');
unset($nm['rows']);
if ($values === 'reset_action_view' || $_GET['ajax'] === 'true') if ($values === 'reset_action_view' || $_GET['ajax'] === 'true')
{ {
$nm['action'] = $action = ''; $nm['action'] = $action = '';
@ -765,8 +766,7 @@ class infolog_ui
{ {
list($do,$do_id) = isset($values['main']) ? each($values['main']) : @each($values['nm']['rows']); list($do,$do_id) = isset($values['main']) ? each($values['main']) : @each($values['nm']['rows']);
list($do_id) = @each($do_id); list($do_id) = @each($do_id);
//echo "<p>infolog::index: do='$do/$do_id', referer="; _debug_array($called_as); switch((string)$do)
switch($do)
{ {
case 'close': case 'close':
$closesingle=true; $closesingle=true;
@ -801,6 +801,11 @@ class infolog_ui
$values['nm']['col_filter']['info_id_parent'] = $action_id; $values['nm']['col_filter']['info_id_parent'] = $action_id;
} }
break; break;
default:
if(in_array($action, array_keys(egw_link::app_list())))
{
$values['nm']['col_filter']['linked'] = "$action:$action_id";
}
} }
$readonlys['cancel'] = $action != 'sp'; $readonlys['cancel'] = $action != 'sp';
@ -2581,15 +2586,13 @@ class infolog_ui
return False; return False;
} }
$this->called_by = $app; // for read/save_sessiondata, to have different sessions for the hooks $this->called_by = $app; // for read/save_sessiondata, to have different sessions for the hooks
$GLOBALS['egw_info']['flags']['currentapp'] = 'infolog';
translation::add_app('infolog'); translation::add_app('infolog');
etemplate::$hooked = true; $this->index(null,$app,$args[$view_id],array(
$this->index(0,$app,$args[$view_id],array(
'menuaction' => $view, 'menuaction' => $view,
isset($view_id2) ? $view_id2 : $view_id => $args[$view_id] isset($view_id2) ? $view_id2 : $view_id => $args[$view_id]
),True); ),True);
etemplate::$hooked = false;
} }
/** /**