aboutsummaryrefslogtreecommitdiffstats
path: root/include/api_zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-31 15:28:25 -0800
committerzotlabs <mike@macgirvin.com>2017-01-31 15:28:25 -0800
commit732065bf13af96f680bc9874afee71c07f74e40a (patch)
treef7bacb814f9ca13dada49932778a41bdfb76e99a /include/api_zot.php
parenta6cbebe03c4c1ca66b4b55c340ebb1d369d93c3a (diff)
downloadvolse-hubzilla-732065bf13af96f680bc9874afee71c07f74e40a.tar.gz
volse-hubzilla-732065bf13af96f680bc9874afee71c07f74e40a.tar.bz2
volse-hubzilla-732065bf13af96f680bc9874afee71c07f74e40a.zip
channel export - use a selected list of functional data categories to export; this allows one to export single data sets instead of always exporting everything we know about
Diffstat (limited to 'include/api_zot.php')
-rw-r--r--include/api_zot.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/api_zot.php b/include/api_zot.php
index 0b10555a6..aaa9ee497 100644
--- a/include/api_zot.php
+++ b/include/api_zot.php
@@ -69,8 +69,13 @@
logger('api_export_basic: no user');
return false;
}
-
- json_return_and_die(identity_basic_export(api_user(),(($_REQUEST['posts']) ? intval($_REQUEST['posts']) : 0 )));
+ $sections = (($_REQUEST['sections']) ? explode(',',$_REQUEST['sections']) : '');
+ if($_REQUEST['posts']) {
+ $sections = get_default_export_sections();
+ $sections[] = 'items';
+ }
+
+ json_return_and_die(identity_basic_export(api_user(),$sections));
}