diff options
author | Mario <mario@mariovavti.com> | 2024-06-13 09:37:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-06-13 09:37:21 +0000 |
commit | 6a63a38e8d4423fa317ce3e3bc6d537b098821c4 (patch) | |
tree | 53768900bf54f7faadd921917f67a3bd7c942a4e /include | |
parent | 088a87914f7bbe5bb45ea125ae3c1b1a8ef0ed80 (diff) | |
parent | ac1e20b1880d57aab2048e670449768d51dbc0b0 (diff) | |
download | volse-hubzilla-6a63a38e8d4423fa317ce3e3bc6d537b098821c4.tar.gz volse-hubzilla-6a63a38e8d4423fa317ce3e3bc6d537b098821c4.tar.bz2 volse-hubzilla-6a63a38e8d4423fa317ce3e3bc6d537b098821c4.zip |
Merge branch 'fix-test-warnings' into 'dev'
Fix test warnings
See merge request hubzilla/core!2134
Diffstat (limited to 'include')
-rw-r--r-- | include/menu.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/menu.php b/include/menu.php index 1f65f987d..2fcf88bca 100644 --- a/include/menu.php +++ b/include/menu.php @@ -166,7 +166,8 @@ function menu_create($arr) { if($r) return false; - $t = datetime_convert(); + $time_created = datetime_convert('UTC', 'UTC', empty($arr['menu_created']) ? 'now' : $arr['menu_created']); + $time_edited = empty($arr['menu_edited']) ? $time_created : datetime_convert('UTC', 'UTC', $arr['menu_edited']); $r = q("insert into menu ( menu_name, menu_desc, menu_flags, menu_channel_id, menu_created, menu_edited ) values( '%s', '%s', %d, %d, '%s', '%s' )", @@ -174,8 +175,8 @@ function menu_create($arr) { dbesc($menu_desc), intval($menu_flags), intval($menu_channel_id), - dbesc(datetime_convert('UTC','UTC',(($arr['menu_created']) ? $arr['menu_created'] : $t))), - dbesc(datetime_convert('UTC','UTC',(($arr['menu_edited']) ? $arr['menu_edited'] : $t))) + dbesc($time_created), + dbesc($time_edited) ); if(! $r) return false; |