Fix saving NULL value
This reverts commit ed130065
.
Conflicts:
adminer/drivers/mongo.inc.php
adminer/include/functions.inc.php
This commit is contained in:
parent
3e769815bf
commit
a3e1cd7bb6
|
@ -116,10 +116,6 @@ if (isset($_GET["mongo"])) {
|
|||
class Min_Driver extends Min_SQL {
|
||||
public $primary = "_id";
|
||||
|
||||
function quote($value) {
|
||||
return ($value === null ? $value : parent::quote($value));
|
||||
}
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
$select = ($select == array("*")
|
||||
? array()
|
||||
|
|
|
@ -10,14 +10,6 @@
|
|||
$this->_conn = $connection;
|
||||
}
|
||||
|
||||
/** Quote a SQL string or null value
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function quote($value) {
|
||||
return ($value === null ? "NULL" : $this->_conn->quote($value));
|
||||
}
|
||||
|
||||
/** Select data from table
|
||||
* @param string
|
||||
* @param array result of $adminer->selectColumnsProcess()[0]
|
||||
|
|
|
@ -285,13 +285,13 @@ function get_password() {
|
|||
return $return;
|
||||
}
|
||||
|
||||
/** Shortcut for $driver->quote($string)
|
||||
/** Shortcut for $connection->quote($string)
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function q($string) {
|
||||
global $driver;
|
||||
return $driver->quote($string);
|
||||
global $connection;
|
||||
return $connection->quote($string);
|
||||
}
|
||||
|
||||
/** Get list of values from database
|
||||
|
@ -937,7 +937,7 @@ function process_input($field) {
|
|||
return ($field["on_update"] == "CURRENT_TIMESTAMP" ? idf_escape($field["field"]) : false);
|
||||
}
|
||||
if ($function == "NULL") {
|
||||
$value = null;
|
||||
return "NULL";
|
||||
}
|
||||
if ($field["type"] == "set") {
|
||||
return array_sum((array) $value);
|
||||
|
|
|
@ -4,6 +4,7 @@ Unlock session in alter database
|
|||
Make master key unreadable to others (bug #410)
|
||||
Fix edit by long non-utf8 string
|
||||
Specify encoding for PHP 5.6 with invalid default_charset
|
||||
Fix saving NULL value, bug since Adminer 4.0.3
|
||||
MySQL: Use utf8mb4 if available
|
||||
Elasticsearch: Use where in select
|
||||
Danish translation
|
||||
|
|
Loading…
Reference in a new issue