diff options
author | Mathias Stearn <mathias@10gen.com> | 2010-11-01 13:39:57 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2010-11-01 13:39:57 -0400 |
commit | d1b5bad7511bfcc0d4d7dacb387ab2c4acbbe8cd (patch) | |
tree | 3190066fad926248d330fb5e46ddbd2a54d10e61 /shell/db.js | |
parent | 53973d365f4276c918d10c1337fc492201fd305d (diff) | |
download | mongo-d1b5bad7511bfcc0d4d7dacb387ab2c4acbbe8cd.tar.gz |
Remove underscore from db.adminCommand and add alias to old name
Diffstat (limited to 'shell/db.js')
-rw-r--r-- | shell/db.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/db.js b/shell/db.js index b8931de5727..481f50feb6b 100644 --- a/shell/db.js +++ b/shell/db.js @@ -46,12 +46,14 @@ DB.prototype.runCommand = function( obj ){ DB.prototype._dbCommand = DB.prototype.runCommand; -DB.prototype._adminCommand = function( obj ){ +DB.prototype.adminCommand = function( obj ){ if ( this._name == "admin" ) return this.runCommand( obj ); return this.getSisterDB( "admin" ).runCommand( obj ); } +DB.prototype._adminCommand = DB.prototype.adminCommand; // alias old name + DB.prototype.addUser = function( username , pass, readOnly ){ readOnly = readOnly || false; var c = this.getCollection( "system.users" ); |