aboutsummaryrefslogtreecommitdiffstats
path: root/mod/mitem.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-08 18:40:19 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-08 18:40:19 -0700
commit50d7554ccd36d483a7fc205215e0d980232ce368 (patch)
treeeca3e704fc77e6a9e9735dae2ee4856fedf16a6f /mod/mitem.php
parent1ebaacfd5e7e481cbc025842e78161f79f5d7cce (diff)
downloadvolse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.tar.gz
volse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.tar.bz2
volse-hubzilla-50d7554ccd36d483a7fc205215e0d980232ce368.zip
add sync packets for menus
Diffstat (limited to 'mod/mitem.php')
-rw-r--r--mod/mitem.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/mod/mitem.php b/mod/mitem.php
index bc93165ac..b62feb97c 100644
--- a/mod/mitem.php
+++ b/mod/mitem.php
@@ -64,6 +64,7 @@ function mitem_post(&$a) {
$_REQUEST['mitem_id'] = $mitem_id;
$r = menu_edit_item($_REQUEST['menu_id'],$uid,$_REQUEST);
if($r) {
+ menu_sync_packet($uid,get_observer_hash(),$_REQUEST['menu_id']);
//info( t('Menu element updated.') . EOL);
goaway(z_root() . '/mitem/' . $_REQUEST['menu_id'] . (($a->is_sys) ? '?f=&sys=1' : ''));
}
@@ -74,6 +75,7 @@ function mitem_post(&$a) {
else {
$r = menu_add_item($_REQUEST['menu_id'],$uid,$_REQUEST);
if($r) {
+ menu_sync_packet($uid,get_observer_hash(),$menu_id);
//info( t('Menu element added.') . EOL);
if($_REQUEST['submit']) {
goaway(z_root() . '/menu' . (($a->is_sys) ? '?f=&sys=1' : ''));
@@ -207,6 +209,7 @@ function mitem_content(&$a) {
$lockstate = (($mitem['allow_cid'] || $mitem['allow_gid'] || $mitem['deny_cid'] || $mitem['deny_gid']) ? 'lock' : 'unlock');
if(argc() == 4 && argv(3) == 'drop') {
+ menu_sync_packet($uid,get_observer_hash(),$mitem['mitem_menu_id']);
$r = menu_del_item($mitem['mitem_menu_id'], $uid, intval(argv(2)));
if($r)
info( t('Menu item deleted.') . EOL);