aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-08 18:40:56 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-08 18:40:56 -0700
commitf0847e6f32ceb5a91109f968225b3492dcfe6c9c (patch)
tree99d429acaf36113f1dc09414560c5cfe5b2731f5 /include
parentb28d3015fe5d65858736177e306f17543a629fc0 (diff)
downloadvolse-hubzilla-f0847e6f32ceb5a91109f968225b3492dcfe6c9c.tar.gz
volse-hubzilla-f0847e6f32ceb5a91109f968225b3492dcfe6c9c.tar.bz2
volse-hubzilla-f0847e6f32ceb5a91109f968225b3492dcfe6c9c.zip
debugging menu sync
Diffstat (limited to 'include')
-rw-r--r--include/import.php2
-rw-r--r--include/menu.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/import.php b/include/import.php
index 7b2f574d9..e468889b4 100644
--- a/include/import.php
+++ b/include/import.php
@@ -690,6 +690,7 @@ function sync_menus($channel,$menus) {
}
$editing = false;
+
$r = q("select * from menu where menu_name = '%s' and menu_channel_id = %d limit 1",
dbesc($m['menu_name']),
intval($channel['channel_id'])
@@ -702,6 +703,7 @@ function sync_menus($channel,$menus) {
continue;
}
$menu_id = $r[0]['menu_id'];
+ $m['menu_id'] = $r[0]['menu_id'];
$x = menu_edit($m);
if(! $x)
continue;
diff --git a/include/menu.php b/include/menu.php
index 32d8630a6..075372515 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -238,7 +238,6 @@ function menu_edit($arr) {
return false;
}
-
$r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1",
intval($menu_id),
intval($menu_channel_id)
@@ -391,7 +390,7 @@ function menu_del_item($menu_id,$uid,$item_id) {
function menu_sync_packet($uid,$observer_hash,$menu_id,$delete = false) {
$r = menu_fetch_id($menu_id,$uid);
if($r) {
- $m = menu_fetch($r[0]['menu_name'],$uid,$observer_hash);
+ $m = menu_fetch($r['menu_name'],$uid,$observer_hash);
if($m) {
if($delete)
$m['menu_delete'] = 1;