1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

MongoDB: show value of _id field instead of class name

This commit is contained in:
Vladimír Kriška
2014-01-08 12:26:21 +01:00
committed by Jakub Vrana
parent 7d83d0ecb9
commit dc4485f0a9

View File

@@ -56,12 +56,13 @@ if (isset($_GET["mongo"])) {
$this->_charset[$key] = 63; $this->_charset[$key] = 63;
} }
$row[$key] = $row[$key] =
(is_a($val, 'MongoId') ? 'ObjectId("' . strval($val) . '")':
(is_a($val, 'MongoDate') ? gmdate("Y-m-d H:i:s", $val->sec) . " GMT" : (is_a($val, 'MongoDate') ? gmdate("Y-m-d H:i:s", $val->sec) . " GMT" :
(is_a($val, 'MongoBinData') ? $val->bin : //! allow downloading (is_a($val, 'MongoBinData') ? $val->bin : //! allow downloading
(is_a($val, 'MongoRegex') ? strval($val) : (is_a($val, 'MongoRegex') ? strval($val) :
(is_object($val) ? get_class($val) : // MongoMinKey, MongoMaxKey (is_object($val) ? get_class($val) : // MongoMinKey, MongoMaxKey
$val $val
)))); )))));
} }
$this->_rows[] = $row; $this->_rows[] = $row;
foreach ($row as $key => $val) { foreach ($row as $key => $val) {