fix some problem in the addressbook_view hook: deleting and closing of infolog entries caused only a refresh of the page

This commit is contained in:
Ralf Becker 2006-03-16 14:26:12 +00:00
parent c751dee313
commit a3951c16bc

View File

@ -307,7 +307,7 @@
case 'edit_status': case 'edit_status':
return $this->edit($do_id,$action,$action_id,'',$called_as); return $this->edit($do_id,$action,$action_id,'',$called_as);
case 'delete': case 'delete':
if (!($values['msg'] = $this->delete($do_id,$called_as,'index'))) return; if (!($values['msg'] = $this->delete($do_id,$called_as,$called_as ? '' : 'index'))) return;
break; break;
case 'close': case 'close':
return $this->close($do_id,$called_as,$do == 'close_subs'); return $this->close($do_id,$called_as,$do == 'close_subs');
@ -952,18 +952,14 @@
case 'addressbook_view': case 'addressbook_view':
$app = 'addressbook'; $app = 'addressbook';
$view_id = 'ab_id'; $view_id = 'ab_id';
$view = 'addressbook.uiaddressbook.view'; $view_id2 = 'contact_id';
$view = 'addressbook.uicontacts.view';
break; break;
case 'projects_view': case 'projects_view':
$app = 'projects'; $app = 'projects';
$view_id = 'project_id'; $view_id = 'project_id';
$view = 'projects.uiprojects.view'; $view = 'projects.uiprojects.view';
break; break;
case 'calendar_view':
$app = 'calendar';
$view_id = 'cal_id';
$view = 'calendar.uicalendar.view';
break;
default: default:
$app = $args['app']; $app = $args['app'];
$view_id = $args['view_id']; $view_id = $args['view_id'];
@ -987,7 +983,7 @@
$GLOBALS['egw_info']['etemplate']['hooked'] = True; $GLOBALS['egw_info']['etemplate']['hooked'] = True;
$this->index(0,$app,$args[$view_id],array( $this->index(0,$app,$args[$view_id],array(
'menuaction' => $view, 'menuaction' => $view,
$view_id => $args[$view_id] isset($view_id2) ? $view_id2 : $view_id => $args[$view_id]
),True); ),True);
$GLOBALS['egw_info']['flags']['currentapp'] = $save_app; $GLOBALS['egw_info']['flags']['currentapp'] = $save_app;
unset($GLOBALS['egw_info']['etemplate']['hooked']); unset($GLOBALS['egw_info']['etemplate']['hooked']);