From: <Cra...@nt...> - 2005-06-18 12:49:33
|
Author: CrawfordCurrie Date: 2005-06-18 05:49:11 -0700 (Sat, 18 Jun 2005) New Revision: 4385 Modified: twiki/branches/DEVELOP/lib/TWiki/Meta.pm twiki/branches/DEVELOP/lib/TWiki/Store.pm Log: EncodingOfFormValuesBroken: the format number of old topics was being retained after they were read in, even though they were being written using the new encoding. Fixed it so that the old format version only lasts as long as the read process. Modified: twiki/branches/DEVELOP/lib/TWiki/Meta.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Meta.pm 2005-06-18 12:28:03 UTC (rev 4384) +++ twiki/branches/DEVELOP/lib/TWiki/Meta.pm 2005-06-18 12:49:11 UTC (rev 4385) @@ -52,10 +52,6 @@ use Assert; use TWiki::Merge; -use vars qw( $formatVersion ); - -$formatVersion = '1.1'; - =pod ---++ ClassMethod new($session, $web, $topic) @@ -327,7 +323,7 @@ version => '1.'.$rev, date => $time, author => $user->wikiName(), - format => $formatVersion + format => $TWiki::Store::STORE_FORMAT_VERSION } ); } Modified: twiki/branches/DEVELOP/lib/TWiki/Store.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Store.pm 2005-06-18 12:28:03 UTC (rev 4384) +++ twiki/branches/DEVELOP/lib/TWiki/Store.pm 2005-06-18 12:49:11 UTC (rev 4385) @@ -42,6 +42,10 @@ use strict; +use vars qw( $STORE_FORMAT_VERSION ); + +$STORE_FORMAT_VERSION = '1.1'; + =pod ---++ ClassMethod new() @@ -1034,7 +1038,11 @@ (&_addMetaDatum($meta,'TOPICINFO',$1))gem; my $ti = $meta->get( 'TOPICINFO' ); - $format = $ti->{format} if $ti; + if( $ti ) { + $format = $ti->{format}; + # Make sure we update the topic format + $ti->{format} = $STORE_FORMAT_VERSION; + } $$rtext =~ s/^%META:([^{]+){(.*)}%\r?\n/&_addMetaDatum($meta,$1,$2,$format)/gem; |