mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
MongoDB: Execute commands against the selected DB
This commit is contained in:
@@ -217,7 +217,7 @@ if (isset($_GET["mongo"])) {
|
||||
function connect($uri, $options) {
|
||||
$class = 'MongoDB\Driver\Manager';
|
||||
$this->_link = new $class($uri, $options);
|
||||
$this->executeCommand('admin', array('ping' => 1));
|
||||
$this->executeCommand($options["db"], array('ping' => 1));
|
||||
}
|
||||
|
||||
function executeCommand($db, $command) {
|
||||
@@ -399,7 +399,7 @@ if (isset($_GET["mongo"])) {
|
||||
function get_databases($flush) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach ($connection->executeCommand('admin', array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($connection->executeCommand($connection->_db_name, array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($dbs->databases as $db) {
|
||||
$return[] = $db->name;
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
Adminer 4.16.0-dev:
|
||||
PostgreSQL: Preserve whitespace in EXPLAIN (bug #827)
|
||||
Oracle: Include tables granted by other user
|
||||
MongoDB: Execute commands against the selected DB
|
||||
|
||||
Adminer 4.15.0:
|
||||
Escape unknown field in select
|
||||
|
Reference in New Issue
Block a user