Commit e5cb2c7a by Kevin McGrath

After auth to the admin use db_name if set to switch to the correct MongoDB

parent 7399d012
......@@ -14,6 +14,12 @@ print("Version 1.2.1, released 29 July 2012")
var dbs = new Array();
var emptyDbs = new Array();
if (typeof db_name === "string") {
db = db.getMongo().getDB( db_name );
}
db.adminCommand('listDatabases').databases.forEach(function(d){
if(db.getSisterDB(d.name).getCollectionNames().length > 0) {
dbs.push(d.name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment