Index: branches/5.3.x/core/units/email_templates/email_template_eh.php =================================================================== diff -u -N -r15918 -r15988 --- branches/5.3.x/core/units/email_templates/email_template_eh.php (.../email_template_eh.php) (revision 15918) +++ branches/5.3.x/core/units/email_templates/email_template_eh.php (.../email_template_eh.php) (revision 15988) @@ -1,6 +1,6 @@ Array ('self' => 'view'), 'OnExportEmailTemplates' => Array ('self' => 'view'), - 'OnSuggestAddress' => Array ('self' => 'add|edit'), + 'OnSuggestAddressJSON' => Array ('self' => 'add|edit'), // events only for developers 'OnPreCreate' => Array ('self' => 'debug'), @@ -433,12 +433,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 ) { @@ -478,15 +478,7 @@ $data = Array (); } - $this->Application->XMLHeader(); - - echo ''; - - foreach ($data as $item) { - echo '' . kUtil::escape($item, kUtil::ESCAPE_HTML) . ''; - } - - echo ''; + echo json_encode($data); } /**