From 0c071a63836b489a957351abd8ab13b1bd701999 Mon Sep 17 00:00:00 2001 From: OlivierRaginel Date: Thu, 29 Oct 2009 15:13:52 +0000 Subject: [PATCH] Item2299: Refresh meta topic object after move git-svn-id: http://svn.foswiki.org/trunk@5394 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- core/lib/Foswiki/Meta.pm | 2 +- core/lib/Foswiki/UI/Rename.pm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/lib/Foswiki/Meta.pm b/core/lib/Foswiki/Meta.pm index a41dda3c11..fac6b38fe1 100644 --- a/core/lib/Foswiki/Meta.pm +++ b/core/lib/Foswiki/Meta.pm @@ -703,7 +703,7 @@ sub reload { $this->{FILEATTACHMENT} = []; $this->{_loadedRev} = $this->{_session}->{store}->readTopic( $this, $rev ); - # SMELL: removed see getLoadedRevision - should remove any + # SMELL: removed see getLoadedRev - should remove any # non-numeric rev's (like the $rev stuff from svn) $this->{_preferences}->finish() if defined $this->{_preferences}; $this->{_preferences} = undef; diff --git a/core/lib/Foswiki/UI/Rename.pm b/core/lib/Foswiki/UI/Rename.pm index b0445e3f22..bb71b65c92 100644 --- a/core/lib/Foswiki/UI/Rename.pm +++ b/core/lib/Foswiki/UI/Rename.pm @@ -764,6 +764,10 @@ sub _moveTopicOrAttachment { ); }; + # Force reload of new object, as it's been moved + delete $to->{_loadedRev}; + $to->reload; + if ( $from->web ne $to->web ) { # If the web changed, replace local refs to the topics