Changeset 17910
- Timestamp:
- 10/03/08 19:39:20 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php
r17900 r17910 703 703 { 704 704 $undeleted = true; 705 // refresh 706 $object = $_MIDCOM->dbfactory->get_object_by_guid($guid); 705 707 } 706 708 } … … 710 712 { 711 713 $undeleted = true; 714 // refresh 715 $object = $_MIDCOM->dbfactory->get_object_by_guid($guid); 712 716 } 713 717 } … … 718 722 debug_pop(); 719 723 } 724 else 725 { 726 $parent = $object->get_parent(); 727 if ( $parent 728 && $parent->guid) 729 { 730 // Invalidate parent from cache so content caches have chance to react 731 $_MIDCOM->cache->invalidate($parent->guid); 732 } 733 734 // Invalidate Midgard pagecache if we touched style/page element 735 if ( function_exists('mgd_cache_invalidate') 736 && ( is_a($object, 'midgard_element') 737 || is_a($object, 'midgard_pageelement')) 738 ) 739 { 740 mgd_cache_invalidate(); 741 } 742 } 720 743 $stats[$guid] = $undeleted; 721 744 722 745 // FIXME: We should only undelete parameters & attachments deleted inside some small window of the main objects delete 723 746 debug_push_class(__CLASS__, __FUNCTION__); … … 730 753 midcom_baseclasses_core_dbobject::undelete_attachments($guid); 731 754 755 //FIXME: are we sure we want to undelete all children here unconditionally, shouldn't it be left as UI decision ?? 732 756 // List all deleted children 733 757 $children_types = $ref->get_child_objects($object, true);
