export TERM_FILE when mirroring

This commit is contained in:
redmatrix 2015-09-08 19:13:43 -07:00
parent d413b6eba8
commit e6690c818d
2 changed files with 7 additions and 1 deletions

View file

@ -666,6 +666,7 @@ function identity_export_year($channel_id,$year,$month = 0) {
$target_month = '01'; $target_month = '01';
$ret = array(); $ret = array();
$mindate = datetime_convert('UTC','UTC',$year . '-' . $target_month . '-01 00:00:00'); $mindate = datetime_convert('UTC','UTC',$year . '-' . $target_month . '-01 00:00:00');
if($month && $month < 12) if($month && $month < 12)
$maxdate = datetime_convert('UTC','UTC',$year . '-' . $target_month_plus . '-01 00:00:00'); $maxdate = datetime_convert('UTC','UTC',$year . '-' . $target_month_plus . '-01 00:00:00');

View file

@ -1260,7 +1260,7 @@ function encode_item($item,$mirror = false) {
$x['comment_scope'] = $c_scope; $x['comment_scope'] = $c_scope;
if($item['term']) if($item['term'])
$x['tags'] = encode_item_terms($item['term']); $x['tags'] = encode_item_terms($item['term'],$mirror);
if($item['diaspora_meta']) if($item['diaspora_meta'])
$x['diaspora_signature'] = crypto_unencapsulate(json_decode($item['diaspora_meta'],true),$key); $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 ); $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) { if($terms) {
foreach($terms as $term) { foreach($terms as $term) {
if(in_array($term['type'],$allowed_export_terms)) if(in_array($term['type'],$allowed_export_terms))