Skip to content

Commit

Permalink
Item15023: bring back rev to FORMFIELD
Browse files Browse the repository at this point in the history
regression due to last patch
  • Loading branch information
MichaelDaum committed May 7, 2021
1 parent c325903 commit 94965a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion core/lib/Foswiki/Macros/FORMFIELD.pm
Expand Up @@ -60,7 +60,15 @@ sub FORMFIELD {
$format = '$value';
}

unless ( $topicObject->latestIsLoaded() ) {
if ( defined $rev && length($rev) ) {
my $crev = $topicObject->getLoadedRev();
if ( defined $crev && $crev != $rev ) {
$topicObject =
Foswiki::Meta->load( $topicObject->session, $topicObject->web,
$topicObject->topic, $rev );
}
}
elsif ( !$topicObject->latestIsLoaded() ) {

# load latest rev
$topicObject =
Expand Down
1 change: 0 additions & 1 deletion core/lib/Foswiki/Macros/QUERY.pm
Expand Up @@ -30,7 +30,6 @@ sub QUERY {

my $rev = $params->{rev};

# FORMFIELD does its own caching.
# Either the home-made cache there should go into Meta so that both
# FORMFIELD and QUERY benefit, or the store should be made a lot smarter.

Expand Down

0 comments on commit 94965a1

Please sign in to comment.