menu import and sync

This commit is contained in:
redmatrix
2015-09-08 17:51:48 -07:00
parent c6bdf7e891
commit 75d521d42a
8 changed files with 168 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
require_once('include/zot.php');
require_once('include/crypto.php');
require_once('include/menu.php');
/**
@@ -595,6 +596,16 @@ function identity_basic_export($channel_id, $items = false) {
foreach($r as $rr)
$ret['event_item'][] = encode_item($rr,true);
}
$x = menu_list($channel_id);
if($x) {
$ret['menu'] = array();
for($y = 0; $y < count($x); $y ++) {
$m = menu_fetch($x[$y]['menu_name'],$channel_id,$ret['channel']['channel_hash']);
if($m)
$ret['menu'][] = menu_element($m);
}
}
if(! $items)