Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r9227 -r9275 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9227) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9275) @@ -2095,6 +2095,32 @@ exit(); } + /** + * Enter description here... + * + * @param kEvent $event + */ + function OnSuggestValues(&$event) + { + safeDefine('DBG_SKIP_REPORTING', 1); + $lang =& $this->Application->recallObject('lang.current'); + header('Content-type: text/xml; charset='.$lang->GetDBField('Charset')); + + $field = $this->Application->GetVar('field'); + $cur_value = $this->Application->GetVar('cur_value'); + if (!$field || !$cur_value) exit; + $obj =& $event->getObject(); + $q = 'SELECT DISTINCT '.$field.' FROM '.$obj->TableName.' + WHERE '.$field.' LIKE '.$this->Conn->qstr($cur_value.'%').' ORDER BY '.$field.' LIMIT 0,20'; + $data = $this->Conn->GetCol($q); + echo ''; + foreach ($data as $item) { + echo "$item"; + } + echo ''; + exit; + } + }