aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-08 19:13:43 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-08 19:13:43 -0700
commite6690c818df5f64f26a92bdbbeb867056bab6a1a (patch)
tree5cb7556805144f68b865f92ccb45de72f2cea67a /include
parentd413b6eba800259e0ba843843e7eebb73155cb4e (diff)
downloadvolse-hubzilla-e6690c818df5f64f26a92bdbbeb867056bab6a1a.tar.gz
volse-hubzilla-e6690c818df5f64f26a92bdbbeb867056bab6a1a.tar.bz2
volse-hubzilla-e6690c818df5f64f26a92bdbbeb867056bab6a1a.zip
export TERM_FILE when mirroring
Diffstat (limited to 'include')
-rw-r--r--include/identity.php1
-rwxr-xr-xinclude/items.php7
2 files changed, 7 insertions, 1 deletions
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))