Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13824: fails to update topics in subwebs
  * Web/SubWeb.Topic ... updated just fine
  * Web.SubWeb.Topic ... not updated
  • Loading branch information
MichaelDaum committed Oct 18, 2015
1 parent 916bfbe commit 4b790f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion data/System/DBCacheContrib.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="autosave" date="1398768235" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1445164284" format="1.1" version="1"}%
---+!! %TOPIC%
%FORMFIELD{"Description"}%

Expand Down Expand Up @@ -132,6 +132,7 @@ This code is based on an original development of Motorola Inc. and is protected
---++ Change History

%TABLE{columnwidths="7em" tablewidth="100%"}%
| 18 Oct 2015 | Foswikitask:Item13824: fixed dbcache failing to update topics in subwebs under certain conditions |
| 29 Sep 2015 | Foswikitask:Item13763: performance improvement: use fastget() instead of get() wherever possible |
| 25 Sep 2015 | Foswikitask:Item13753: ref operator fails under certain conditions |
| 12 Jan 2015 | Foswikitask:Item13148: added support for CPAN:Sereal |
Expand Down
13 changes: 10 additions & 3 deletions lib/Foswiki/Contrib/DBCacheContrib.pm
Expand Up @@ -41,8 +41,8 @@ FormQueryPlugin for an example of this.
=cut

our $VERSION = '4.02';
our $RELEASE = '29 Sep 2015';
our $VERSION = '4.03';
our $RELEASE = '18 Oct 2015';
our $SHORTDESCRIPTION =
'Reusable code that treats forms as if they were table rows in a database';

Expand Down Expand Up @@ -615,7 +615,13 @@ Check the file time against what is seen on disc. Return 1 if consistent, 0 if i

sub uptodate {
my ( $path, $time ) = @_;
my ( $web, $topic ) = split( /\./, $path, 2 );

$path =~ m/^(.*)\.(.*?)$/;
my $web = $1;
my $topic = $2;

$web =~ s/\./\//g;

ASSERT( $web, $path ) if DEBUG;
ASSERT( $topic, $path ) if DEBUG;

Expand All @@ -632,6 +638,7 @@ sub uptodate {
$Foswiki::Plugins::SESSION->{store}
->getTopicLatestRevTime( $web, $topic );
}

return ( $fileTime == $time ) ? 1 : 0;
}

Expand Down

0 comments on commit 4b790f3

Please sign in to comment.