mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
allow sql fragments in Api\Storage\Base::delete as in other places
This commit is contained in:
parent
0d99d129dc
commit
790fa8c71d
@ -776,7 +776,11 @@ 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 (isset($data[$col]))
|
if (is_int($db_col))
|
||||||
|
{
|
||||||
|
$keys[] = $col;
|
||||||
|
}
|
||||||
|
elseif (isset($data[$col]))
|
||||||
{
|
{
|
||||||
$keys[$db_col] = $col;
|
$keys[$db_col] = $col;
|
||||||
}
|
}
|
||||||
@ -785,9 +789,16 @@ class Base
|
|||||||
$data = $this->data2db($data);
|
$data = $this->data2db($data);
|
||||||
|
|
||||||
foreach($keys as $db_col => $col)
|
foreach($keys as $db_col => $col)
|
||||||
|
{
|
||||||
|
if (is_int($db_col))
|
||||||
|
{
|
||||||
|
$query[] = $col;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$query[$db_col] = $data[$col];
|
$query[$db_col] = $data[$col];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($only_return_query) return $query;
|
if ($only_return_query) return $query;
|
||||||
|
|
||||||
$this->db->delete($this->table_name,$query,__LINE__,__FILE__,$this->app);
|
$this->db->delete($this->table_name,$query,__LINE__,__FILE__,$this->app);
|
||||||
|
Loading…
Reference in New Issue
Block a user