aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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;