debugging menu sync
This commit is contained in:
parent
b28d3015fe
commit
f0847e6f32
@ -690,6 +690,7 @@ function sync_menus($channel,$menus) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$editing = false;
|
$editing = false;
|
||||||
|
|
||||||
$r = q("select * from menu where menu_name = '%s' and menu_channel_id = %d limit 1",
|
$r = q("select * from menu where menu_name = '%s' and menu_channel_id = %d limit 1",
|
||||||
dbesc($m['menu_name']),
|
dbesc($m['menu_name']),
|
||||||
intval($channel['channel_id'])
|
intval($channel['channel_id'])
|
||||||
@ -702,6 +703,7 @@ function sync_menus($channel,$menus) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$menu_id = $r[0]['menu_id'];
|
$menu_id = $r[0]['menu_id'];
|
||||||
|
$m['menu_id'] = $r[0]['menu_id'];
|
||||||
$x = menu_edit($m);
|
$x = menu_edit($m);
|
||||||
if(! $x)
|
if(! $x)
|
||||||
continue;
|
continue;
|
||||||
|
@ -238,7 +238,6 @@ function menu_edit($arr) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1",
|
$r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1",
|
||||||
intval($menu_id),
|
intval($menu_id),
|
||||||
intval($menu_channel_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) {
|
function menu_sync_packet($uid,$observer_hash,$menu_id,$delete = false) {
|
||||||
$r = menu_fetch_id($menu_id,$uid);
|
$r = menu_fetch_id($menu_id,$uid);
|
||||||
if($r) {
|
if($r) {
|
||||||
$m = menu_fetch($r[0]['menu_name'],$uid,$observer_hash);
|
$m = menu_fetch($r['menu_name'],$uid,$observer_hash);
|
||||||
if($m) {
|
if($m) {
|
||||||
if($delete)
|
if($delete)
|
||||||
$m['menu_delete'] = 1;
|
$m['menu_delete'] = 1;
|
||||||
|
Reference in New Issue
Block a user