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