Skip to content

Commit

Permalink
Item9278: Do not log when removing, otherwise we can re-create a just…
Browse files Browse the repository at this point in the history
… deleted web

git-svn-id: http://svn.foswiki.org/trunk@8077 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Jul 8, 2010
1 parent 659c3ee commit 432ae43
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions core/lib/Foswiki/Store/VC/Store.pm
Expand Up @@ -187,7 +187,10 @@ sub moveWeb {
my $handler = $this->getHandler($oldWebObject);
$handler->moveWeb( $newWebObject->web );

$handler->recordChange( $cUID, 0 );
# We have to log in the new web, otherwise we would re-create the dir with
# a useless .changes. See Item9278
$handler = $this->getHandler($newWebObject);
$handler->recordChange( $cUID, 0, 'Moved from ' . $oldWebObject->web );
}

sub testAttachment {
Expand Down Expand Up @@ -407,7 +410,15 @@ sub remove {

my $handler = $this->getHandler( $topicObject, $attachment );
$handler->remove();
$handler->recordChange( $cUID, 0 );

# Only log when deleting topics or attachment, otherwise we would re-create
# an empty directory with just a .changes. See Item9278
if ( my $topic = $topicObject->topic ) {
$handler->recordChange( $cUID, 0, 'Deleted ' . $topic );
}
elsif ($attachment) {
$handler->recordChange( $cUID, 0, 'Deleted attachment ' . $attachment );
}
}

#also deprecated. (use Foswiki::Meta::query)
Expand Down

0 comments on commit 432ae43

Please sign in to comment.