mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-04-10 09:09:21 +02:00
* Api: Fix SQL error from doubled table name in group statement
"Unknown column 'egw_tracker.egw_tracker.tr_id' in 'group statement'"
This commit is contained in:
parent
ec31d93af2
commit
2045c08e54
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
|
use EGroupware\Api\Storage\Customfields;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generalized SQL Storage Object with build in custom field support
|
* Generalized SQL Storage Object with build in custom field support
|
||||||
*
|
*
|
||||||
@ -220,7 +222,7 @@ class Storage extends Storage\Base
|
|||||||
{
|
{
|
||||||
$id = isset($data[$this->autoinc_id]) ? $data[$this->autoinc_id] : $data[$this->db_key_cols[$this->autoinc_id]];
|
$id = isset($data[$this->autoinc_id]) ? $data[$this->autoinc_id] : $data[$this->db_key_cols[$this->autoinc_id]];
|
||||||
|
|
||||||
\EGroupware\Api\Storage\Customfields::handle_files($this->app, $id, $data, $this->customfields);
|
Customfields::handle_files($this->app, $id, $data, $this->customfields);
|
||||||
|
|
||||||
foreach (array_keys((array)$this->customfields) as $name)
|
foreach (array_keys((array)$this->customfields) as $name)
|
||||||
{
|
{
|
||||||
@ -586,7 +588,7 @@ class Storage extends Storage\Base
|
|||||||
else if (stripos($col, 'AS') !== false && $order_by)
|
else if (stripos($col, 'AS') !== false && $order_by)
|
||||||
{
|
{
|
||||||
list($value, $alias) = explode(' AS ', $col);
|
list($value, $alias) = explode(' AS ', $col);
|
||||||
if(stripos($order_by, $alias) !== FALSE)
|
if(stripos($order_by, $alias) !== FALSE && stripos($value, $this->table_name) === FALSE)
|
||||||
{
|
{
|
||||||
$order_by = str_replace($alias, $value, $order_by);
|
$order_by = str_replace($alias, $value, $order_by);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user