diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-08 18:40:19 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-08 18:40:19 -0700 |
commit | 50d7554ccd36d483a7fc205215e0d980232ce368 (patch) | |
tree | eca3e704fc77e6a9e9735dae2ee4856fedf16a6f /include | |
parent | 1ebaacfd5e7e481cbc025842e78161f79f5d7cce (diff) | |
download | volse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.tar.gz volse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.tar.bz2 volse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.zip |
add sync packets for menus
Diffstat (limited to 'include')
-rw-r--r-- | include/menu.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/menu.php b/include/menu.php index d20df1d6e..fc8aa1386 100644 --- a/include/menu.php +++ b/include/menu.php @@ -388,3 +388,14 @@ function menu_del_item($menu_id,$uid,$item_id) { return $r; } +function menu_sync_packet($uid,$observer_hash,$menu_id,$delete = false) { + $r = menu_fetch_id($menu_id,$uid); + if($r) { + $m = menu_fetch($r['menu_name'],$uid,$observer_hash); + if($m) { + if($delete) + $m['menu_delete'] = 1; + build_sync_packet($uid,array('menu' => array(menu_element($m)))); + } + } +} |