Index: branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_config.php =================================================================== diff -u -r1372 -r1373 --- branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_config.php (.../config_search_config.php) (revision 1372) +++ branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_config.php (.../config_search_config.php) (revision 1373) @@ -22,12 +22,21 @@ 'Conditional' => false, 'HookToPrefix' => 'cf', 'HookToSpecial' => '', - //'HookToEvent' => Array( 'OnPreSaveCreated' ), 'HookToEvent' => Array( 'OnSave' ), 'DoPrefix' => 'confs', 'DoSpecial' => '', 'DoEvent' => 'OnCreateCustomField', ), + Array( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'cf', + 'HookToSpecial' => '-item', + 'HookToEvent' => Array( 'OnAfterItemDelete' ), + 'DoPrefix' => 'confs', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteCustomField', + ), ), 'IDField' => 'SearchConfigId', Index: branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_event_handler.php =================================================================== diff -u -r1372 -r1373 --- branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1372) +++ branches/unlabeled/unlabeled-1.1.2/core/units/config_search/config_search_event_handler.php (.../config_search_event_handler.php) (revision 1373) @@ -122,6 +122,18 @@ } } + + /** + * Enter description here... + * + * @param kEvent $event + */ + function OnDeleteCustomField(&$event){ + + $custom_field_id =&$event->MasterEvent->getEventParam('id'); + $this->Conn->Query("DELETE FROM ".TABLE_PREFIX."SearchConfig WHERE CustomFieldId=".$custom_field_id); + + } } ?> \ No newline at end of file