Implement new link hook view_list, to be able to be taken to a list of entries

This commit is contained in:
Nathan Gray 2009-12-08 21:48:10 +00:00
parent 721ccb80d8
commit 1524b6670f
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class infolog_hooks
'action' => 'sp' 'action' => 'sp'
), ),
'view_id' => 'action_id', 'view_id' => 'action_id',
'view_list' => 'infolog.infolog_ui.index',
'add' => array( 'add' => array(
'menuaction' => 'infolog.infolog_ui.edit', 'menuaction' => 'infolog.infolog_ui.edit',
'type' => 'task' 'type' => 'task'

View File

@ -545,6 +545,9 @@ class infolog_ui
$values['action'] = $action; $values['action'] = $action;
$values['action_id'] = $action_id; $values['action_id'] = $action_id;
} }
if($_GET['search']) {
$values['nm']['search'] = $_GET['search'];
}
if ($values['nm']['add']) if ($values['nm']['add'])
{ {
$values['add'] = $values['nm']['add']; $values['add'] = $values['nm']['add'];
@ -866,7 +869,7 @@ class infolog_ui
if ($content['info_contact']) if ($content['info_contact'])
{ {
$old_link_id = (int)$content['info_link_id']; $old_link_id = (int)$content['info_link_id'];
list($app,$id) = explode(':',$content['info_contact']); list($app,$id) = explode(':',$content['info_contact'], 2);
$content['info_link_id'] = (int)($info_link_id = egw_link::link('infolog',$content['link_to']['to_id'],$app,$id)); $content['info_link_id'] = (int)($info_link_id = egw_link::link('infolog',$content['link_to']['to_id'],$app,$id));
if ($old_link_id && $old_link_id != $content['info_link_id']) egw_link::unlink($old_link_id); if ($old_link_id && $old_link_id != $content['info_link_id']) egw_link::unlink($old_link_id);
} }