Skip to content

Commit

Permalink
Item10675: add defaulting to the object we're saving into MongoDB so …
Browse files Browse the repository at this point in the history
…that plain .txt files work correctly - I consider this a workaround

git-svn-id: http://svn.foswiki.org/trunk/MongoDBPlugin@11538 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Apr 24, 2011
1 parent 0b18168 commit eace120
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Foswiki/Plugins/MongoDBPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,14 @@ sub _updateTopic {
}
}
}

#workaround for Item10675 - a not-foswiki .txt file
if (not defined($meta->{'TOPICINFO'})) {
$meta->{'TOPICINFO'}->{version} = '1';
$meta->{'TOPICINFO'}->{date} = '0';
$meta->{'TOPICINFO'}->{rev} = '1';
$meta->{'TOPICINFO'}->{author} = 'BaseUserMapping_999';
$meta->{'TOPICINFO'}->{_authorWikiName} = 'UnknownUser';
}

$meta->{_raw_text} = $savedMeta->getEmbeddedStoreForm();

Expand Down

0 comments on commit eace120

Please sign in to comment.