allow sql fragments in Api\Storage\Base::delete as in other places

This commit is contained in:
Ralf Becker 2017-11-06 16:43:23 +01:00
parent 790fa8c71d
commit cfe9204f77

View File

@ -776,15 +776,19 @@ class Base
$data = $keys; $keys = array(); $data = $keys; $keys = array();
foreach($this->db_cols as $db_col => $col) foreach($this->db_cols as $db_col => $col)
{ {
if (is_int($db_col)) if (isset($data[$col]))
{
$keys[] = $col;
}
elseif (isset($data[$col]))
{ {
$keys[$db_col] = $col; $keys[$db_col] = $col;
} }
} }
// keep sql fragments (with integer key)
foreach($data as $key => $val)
{
if (is_int($key))
{
$keys[] = $val;
}
}
} }
$data = $this->data2db($data); $data = $this->data2db($data);