"fix for email addressbook popup: going to next page, readds already added email again

--> caused by using old global var in addressbook code, which is now a static var of etemplate object"
This commit is contained in:
Ralf Becker 2009-06-10 08:55:51 +00:00
parent 78ce775f17
commit 4f418e8766

View File

@ -776,7 +776,7 @@ class addressbook_ui extends addressbook_bo
{ {
$query['advanced_search'] = $old_state['advanced_search']; $query['advanced_search'] = $old_state['advanced_search'];
} }
if ($do_email && $GLOBALS['egw_info']['etemplate']['loop'] && is_object($GLOBALS['egw']->js)) if ($do_email && etemplate::$loop && is_object($GLOBALS['egw']->js))
{ // remove previous addEmail() calls, otherwise they will be run again { // remove previous addEmail() calls, otherwise they will be run again
$GLOBALS['egw']->js->body['onLoad'] = preg_replace('/addEmail\([^)]+\);/','',$GLOBALS['egw']->js->body['onLoad']); $GLOBALS['egw']->js->body['onLoad'] = preg_replace('/addEmail\([^)]+\);/','',$GLOBALS['egw']->js->body['onLoad']);
} }