Skip to content

Commit

Permalink
Item11983: make sure that there won't be an empty comment by accident
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@15337 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Aug 27, 2012
1 parent c96126c commit d6c0f63
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions core/lib/Foswiki/Store/VC/Handler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -360,21 +360,30 @@ sub _cacheMetaInfo {
$rev = $info->{version};
}

# keep comment as is unless specified otherwise
unless ( defined $comment ) {
$comment = $info->{comment};
}
}

# only store a comment attr when there is one
if ( defined $comment && $comment ne '' ) {
$comment = ' comment="' . $comment . '"';
}
else {
$comment = '';
}

$rev ||= 1;

$text =
'%META:TOPICINFO{author="'
. $user
. '" comment="'
'%META:TOPICINFO{'
. 'author="'
. $user . '"'
. $comment
. '" date="'
. $date
. '" format="1.1" version="'
. 'date="'
. $date . '"'
. 'format="1.1" version="'
. $rev . '"}%'
. "\n$text";

Expand Down

0 comments on commit d6c0f63

Please sign in to comment.