1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 20:31:19 +02:00

Fix saving NULL value

This reverts commit ed130065.

Conflicts:
	adminer/drivers/mongo.inc.php
	adminer/include/functions.inc.php
This commit is contained in:
Jakub Vrana
2014-09-13 10:19:51 -07:00
parent 3e769815bf
commit a3e1cd7bb6
4 changed files with 5 additions and 16 deletions

View File

@@ -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]

View File

@@ -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);