mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
* Admin: fix user timezone not taken into account when displaying admin queue
also fixes Api\Storage\Base to also consider type=int&meta=timestamp columns as timestamps
This commit is contained in:
parent
fff431fd4f
commit
579dbc7e1d
@ -184,7 +184,7 @@ abstract class admin_cmd
|
||||
*/
|
||||
function __construct(array $data)
|
||||
{
|
||||
$this->created = time();
|
||||
$this->created = new Api\DateTime('now');
|
||||
$this->creator = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$this->creator_email = admin_cmd::user_email();
|
||||
|
||||
@ -363,7 +363,7 @@ abstract class admin_cmd
|
||||
}
|
||||
if (!is_null($this->id))
|
||||
{
|
||||
$this->modified = time();
|
||||
$this->modified = new Api\DateTime('now');
|
||||
$this->modifier = $set_modifier ? $GLOBALS['egw_info']['user']['account_id'] : 0;
|
||||
if ($set_modifier) $this->modifier_email = admin_cmd::user_email();
|
||||
}
|
||||
@ -669,7 +669,8 @@ abstract class admin_cmd
|
||||
{
|
||||
if (is_null(admin_cmd::$sql))
|
||||
{
|
||||
admin_cmd::$sql = new Api\Storage\Base('admin','egw_admin_queue',null,'cmd_');
|
||||
admin_cmd::$sql = new Api\Storage\Base('admin','egw_admin_queue',null,'cmd_', true, 'object');
|
||||
admin_cmd::$sql->convert_all_timestamps();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -304,9 +304,9 @@ class Base
|
||||
$check_already_included = !empty($this->timestamps);
|
||||
foreach($this->table_def['fd'] as $name => $data)
|
||||
{
|
||||
if ($data['type'] == 'timestamp' && (!$check_already_included || !in_array($name,$this->timestamps)))
|
||||
if (($data['type'] === 'timestamp' || $data['meta'] === 'timestamp') && (!$check_already_included || !in_array($name,$this->timestamps)))
|
||||
{
|
||||
$this->timestamps[] = $name;
|
||||
$this->timestamps[] = $this->db_cols[$name] ?? $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user