aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-08 19:14:29 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-08 19:14:29 -0700
commitf13a8f725c393961b4e3cfa79f1eff348f3893f3 (patch)
treeb40dac54c5aba11888c69f1bf9947e80f2f53b8a
parent5d32aa94d96faf78b63aed07db016ac01fe7f4d3 (diff)
downloadvolse-hubzilla-f13a8f725c393961b4e3cfa79f1eff348f3893f3.tar.gz
volse-hubzilla-f13a8f725c393961b4e3cfa79f1eff348f3893f3.tar.bz2
volse-hubzilla-f13a8f725c393961b4e3cfa79f1eff348f3893f3.zip
export TERM_FILE when mirroring
-rwxr-xr-xinclude/items.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 5d38b0982..4c21d55a1 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1309,7 +1309,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']) {
$z = json_decode($item['diaspora_meta'],true);
@@ -1401,11 +1401,16 @@ function encode_item_xchan($xchan) {
return $ret;
}
-function encode_item_terms($terms) {
+function encode_item_terms($terms,$mirror = false) {
$ret = array();
$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))