From a5fcb430ef39cd9a21b9f0696adc4e1e9fea0334 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 11 Mar 2014 15:26:09 +0000 Subject: [PATCH] Only load infolog list on first time. Loading it again (in an ajax submit) will load it into addressbook.view etemplate2 object used as context for request, corrupting it. --- addressbook/inc/class.addressbook_ui.inc.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index cc18aecfad..204c284358 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2285,10 +2285,15 @@ window.egw_LAB.wait(function() { $this->tmpl->exec('addressbook.addressbook_ui.view',$content,$sel_options,$readonlys,array('id' => $content['id'])); - $GLOBALS['egw']->hooks->process(array( - 'location' => 'addressbook_view', - 'ab_id' => $content['id'] - )); + // Only load this on first time - we're using AJAX, so it stays there through submits. + // Sending it again (via ajax) will break the addressbook.view etemplate2 + if($contact_id) + { + $GLOBALS['egw']->hooks->process(array( + 'location' => 'addressbook_view', + 'ab_id' => $content['id'] + )); + } } /**