From d413b6eba800259e0ba843843e7eebb73155cb4e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 8 Sep 2015 18:45:58 -0700 Subject: merge conflicts --- mod/menu.php | 2 +- mod/mitem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/menu.php b/mod/menu.php index a0a300000..ad47ad1fd 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -47,7 +47,7 @@ function menu_post(&$a) { else { $r = menu_create($_REQUEST); if($r) { - menu_sync_packet($uid,get_observer_hash(),$menu_id); + menu_sync_packet($uid,get_observer_hash(),$r); //info( t('Menu created.') . EOL); goaway(z_root() . '/mitem/' . $r . (($a->is_sys) ? '?f=&sys=1' : '')); diff --git a/mod/mitem.php b/mod/mitem.php index b62feb97c..60d7885dc 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -75,7 +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); + menu_sync_packet($uid,get_observer_hash(),$_REQUEST['menu_id']); //info( t('Menu element added.') . EOL); if($_REQUEST['submit']) { goaway(z_root() . '/menu' . (($a->is_sys) ? '?f=&sys=1' : '')); -- cgit v1.2.3 From e6690c818df5f64f26a92bdbbeb867056bab6a1a Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 8 Sep 2015 19:13:43 -0700 Subject: export TERM_FILE when mirroring --- include/identity.php | 1 + include/items.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/identity.php b/include/identity.php index 4d2f8b961..d84c22693 100644 --- a/include/identity.php +++ b/include/identity.php @@ -666,6 +666,7 @@ function identity_export_year($channel_id,$year,$month = 0) { $target_month = '01'; $ret = array(); + $mindate = datetime_convert('UTC','UTC',$year . '-' . $target_month . '-01 00:00:00'); if($month && $month < 12) $maxdate = datetime_convert('UTC','UTC',$year . '-' . $target_month_plus . '-01 00:00:00'); diff --git a/include/items.php b/include/items.php index 981f52d7a..3669628b4 100755 --- a/include/items.php +++ b/include/items.php @@ -1260,7 +1260,7 @@ function encode_item($item,$mirror = false) { $x['comment_scope'] = $c_scope; if($item['term']) - $x['tags'] = encode_item_terms($item['term']); + $x['tags'] = encode_item_terms($item['term'],$mirror); if($item['diaspora_meta']) $x['diaspora_signature'] = crypto_unencapsulate(json_decode($item['diaspora_meta'],true),$key); @@ -1349,6 +1349,11 @@ function encode_item_terms($terms) { $allowed_export_terms = array( TERM_UNKNOWN, TERM_HASHTAG, TERM_MENTION, TERM_CATEGORY, TERM_BOOKMARK ); + if($mirror) { + $allowed_export_terms[] = TERM_PCATEGORY; + $allowed_export_terms[] = TERM_FILE; + } + if($terms) { foreach($terms as $term) { if(in_array($term['type'],$allowed_export_terms)) -- cgit v1.2.3