Skip to content

Commit

Permalink
Item10676: I can't reproduce trivially atm, so i'll add a die and hop…
Browse files Browse the repository at this point in the history
…e that Paul can give me more info

git-svn-id: http://svn.foswiki.org/trunk/MongoDBPlugin@11544 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Apr 25, 2011
1 parent 54cbb31 commit bf1df8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Foswiki/Plugins/MongoDBPlugin/DB.pm
Expand Up @@ -28,6 +28,8 @@ use Assert;
use Data::Dumper;
use Time::HiRes ();

use Foswiki::Func; #TODO: remove this its there for diagnostics (i think)

#lets declare it ok to run queries on slaves.
#http://search.cpan.org/~kristina/MongoDB-0.42/lib/MongoDB/Cursor.pm#slave_okay
$MongoDB::Cursor::slave_okay = 1;
Expand Down Expand Up @@ -264,6 +266,9 @@ sub getDatabaseName {
my $self = shift;
my $web = shift;

#make sure the web exists?
die "getDatabaseName($web) does not exist" unless (Foswiki::Func::webExists($web));

#using webname as database name, so we need to sanitise
#replace / with __ and pre-pend foswiki__ ?
$web =~ s/\//__/g;
Expand Down

0 comments on commit bf1df8c

Please sign in to comment.