Index: branches/5.2.x/core/units/email_templates/email_template_eh.php =================================================================== diff -u -N -r15856 -r16415 --- branches/5.2.x/core/units/email_templates/email_template_eh.php (.../email_template_eh.php) (revision 15856) +++ branches/5.2.x/core/units/email_templates/email_template_eh.php (.../email_template_eh.php) (revision 16415) @@ -1,6 +1,6 @@ Array ('self' => 'add|edit'), 'OnExportEmailTemplates' => Array ('self' => 'view'), - 'OnSuggestAddress' => Array ('self' => 'add|edit'), + 'OnSuggestAddressJSON' => Array ('self' => 'add|edit'), // events only for developers 'OnPreCreate' => Array ('self' => 'debug'), @@ -500,12 +500,12 @@ * * @param kEvent $event */ - function OnSuggestAddress($event) + function OnSuggestAddressJSON($event) { $event->status = kEvent::erSTOP; $address_type = $this->Application->GetVar('type'); - $address = $this->Application->GetVar('value'); + $address = $this->Application->GetVar('term'); $limit = $this->Application->GetVar('limit'); if ( !$limit ) { @@ -545,15 +545,7 @@ $data = Array (); } - $this->Application->XMLHeader(); - - echo ''; - - foreach ($data as $item) { - echo '' . kUtil::escape($item, kUtil::ESCAPE_HTML) . ''; - } - - echo ''; + echo json_encode($data); } /**