Changeset 17975
- Timestamp:
- 10/06/08 16:40:58 (2 months ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php (modified) (5 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/helper/_componentloader.php (modified) (4 diffs)
- trunk/midcom/midcom.core/midcom/helper/_dbfactory.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php
r17731 r17975 840 840 $this->_on_watched_dba_delete($object); 841 841 break; 842 843 case MIDCOM_OPERATION_DBA_IMPORT: 844 $this->_on_watched_dba_import($object); 845 break; 842 846 } 843 847 } … … 862 866 * @param int $operation The operation identifier (one of the MIDCOM_OPERATION constants) 863 867 * which applies. 864 * @param ob ect $object The object on which the operation has occurred.868 * @param object $object The object on which the operation has occured. 865 869 */ 866 870 function _on_watched_operation($operation, $object) {} … … 876 880 * It is called after the generic _on_watched_operation event handler. 877 881 * 878 * @param ob ect $object The object on which the operation has occurred.882 * @param object $object The object on which the operation has occured. 879 883 */ 880 884 function _on_watched_dba_create($object) {} … … 890 894 * It is called after the generic _on_watched_operation event handler. 891 895 * 892 * @param ob ect $object The object on which the operation has occurred.896 * @param object $object The object on which the operation has occured. 893 897 */ 894 898 function _on_watched_dba_update($object) {} … … 898 902 * that has been done during the request. 899 903 * 900 * It will be called once per operation and unique object, where object uniqueness901 * is determined by the combination of object class and guid. The object has been902 * refreshed before being passed to this event handler.903 *904 904 * It is called after the generic _on_watched_operation event handler. 905 905 * 906 * @param ob ect $object The object on which the operation has occurred.906 * @param object $object The object on which the operation has occured. 907 907 */ 908 908 function _on_watched_dba_delete($object) {} 909 910 /** 911 * This function is triggered at the end of the request for each watched import operation 912 * that has been done during the request. 913 * 914 * It is called after the generic _on_watched_operation event handler. 915 * 916 * @param object $object The object on which the operation has occured. 917 */ 918 function _on_watched_dba_import($object) {} 909 919 910 920 /** trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php
r17955 r17975 1478 1478 function refresh(&$object) 1479 1479 { 1480 // FIXME: be GUID based, but needs further testing... 1481 //return $object->get_by_guid($object->guid); 1480 1482 return $object->get_by_id($object->id); 1481 1483 } trunk/midcom/midcom.core/midcom/helper/_componentloader.php
r17558 r17975 196 196 MIDCOM_OPERATION_DBA_UPDATE => Array(), 197 197 MIDCOM_OPERATION_DBA_DELETE => Array(), 198 MIDCOM_OPERATION_DBA_IMPORT => Array(), 198 199 ); 199 200 … … 212 213 MIDCOM_OPERATION_DBA_UPDATE => Array(), 213 214 MIDCOM_OPERATION_DBA_DELETE => Array(), 215 MIDCOM_OPERATION_DBA_IMPORT => Array(), 214 216 ); 215 217 … … 883 885 { 884 886 debug_push_class(__CLASS__, __FUNCTION__); 885 886 887 if ($this->_watch_notifications === null) 887 888 { … … 896 897 { 897 898 $object = array_shift($data); 898 if ($operation != MIDCOM_OPERATION_DBA_DELETE) 899 if ( $operation != MIDCOM_OPERATION_DBA_DELETE 900 && $operation != MIDCOM_OPERATION_DBA_IMPORT) 899 901 { 900 // Only refresh when we haven't deleted the record.902 // Only refresh when we haven't deleted/imported the record. 901 903 if (! $object->refresh()) 902 904 { trunk/midcom/midcom.core/midcom/helper/_dbfactory.php
r17907 r17975 573 573 574 574 $acl_object->_on_imported(); 575 $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_IMPORT, $ object);575 $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_IMPORT, $acl_object); 576 576 debug_pop(); 577 577 return true;
