aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-28 20:54:57 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-28 20:54:57 -0700
commit07203c1de3b0db9cbd5fa67b5edc22b1a35ba3de (patch)
tree881149b9e6e0eab8a40caba9e286a4f52cb2181c
parent3c82156d63d16c1d7c0226f2f58ae720b904d542 (diff)
downloadvolse-hubzilla-07203c1de3b0db9cbd5fa67b5edc22b1a35ba3de.tar.gz
volse-hubzilla-07203c1de3b0db9cbd5fa67b5edc22b1a35ba3de.tar.bz2
volse-hubzilla-07203c1de3b0db9cbd5fa67b5edc22b1a35ba3de.zip
another case of committing with unsaved changes in a second window
-rw-r--r--include/menu.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/menu.php b/include/menu.php
index 0e5fa3c99..c2c53115f 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -150,14 +150,16 @@ function menu_create($arr) {
if($r)
return false;
+ $t = datetime_convert();
+
$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' )",
dbesc($menu_name),
dbesc($menu_desc),
intval($menu_flags),
intval($menu_channel_id),
- dbesc(datetime_convert()),
- dbesc(datetime_convert())
+ dbesc(datetime_convert('UTC','UTC',(($arr['menu_created']) ? $arr['menu_created'] : $t)),
+ dbesc(datetime_convert('UTC','UTC',(($arr['menu_edited']) ? $arr['menu_edited'] : $t))
);
if(! $r)
return false;