aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-17 22:20:10 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-17 22:20:10 -0700
commitf6823259241484a761bc7e69ce44db281a6cb825 (patch)
treedadad1dcf476b8f12b94810e89175fc3060fedeb /mod
parent1982fc807f9f7eb02429acb3a46bfd8e5ba32748 (diff)
downloadvolse-hubzilla-f6823259241484a761bc7e69ce44db281a6cb825.tar.gz
volse-hubzilla-f6823259241484a761bc7e69ce44db281a6cb825.tar.bz2
volse-hubzilla-f6823259241484a761bc7e69ce44db281a6cb825.zip
provide ability to export by month as well as by year
Diffstat (limited to 'mod')
-rw-r--r--mod/uexport.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/uexport.php b/mod/uexport.php
index b0bb11afa..66bb1e851 100644
--- a/mod/uexport.php
+++ b/mod/uexport.php
@@ -13,11 +13,15 @@ function uexport_init(&$a) {
$year = intval(argv(1));
}
+ if(argc() > 2 && intval(argv(2)) > 1 && intval(argv(2)) <= 12) {
+ $month = intval(argv(2));
+ }
+
header('content-type: application/octet_stream');
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . '.json"' );
if($year) {
- echo json_encode(identity_export_year(local_channel(),$year));
+ echo json_encode(identity_export_year(local_channel(),$year,$month));
killme();
}