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

This commit is contained in:
Ralf Becker 2017-11-06 16:24:30 +01:00
parent 0d99d129dc
commit 790fa8c71d

View File

@ -776,7 +776,11 @@ class Base
$data = $keys; $keys = array();
foreach($this->db_cols as $db_col => $col)
{
if (isset($data[$col]))
if (is_int($db_col))
{
$keys[] = $col;
}
elseif (isset($data[$col]))
{
$keys[$db_col] = $col;
}
@ -786,7 +790,14 @@ class Base
foreach($keys as $db_col => $col)
{
$query[$db_col] = $data[$col];
if (is_int($db_col))
{
$query[] = $col;
}
else
{
$query[$db_col] = $data[$col];
}
}
if ($only_return_query) return $query;