aboutsummaryrefslogtreecommitdiffstats
path: root/mod/uexport.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-08-19 19:40:18 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-08-19 19:40:18 +0200
commite50e68719155c7d35e30bb203a403854f789d5a1 (patch)
treea10630cec177c6629fb0da38d96deb7258062698 /mod/uexport.php
parent07cd0c870f48ec838c23fa7c6966ceb1c41f06ab (diff)
parent4e3d295c909405da61d7ccd6c7bd99bd35c9feec (diff)
downloadvolse-hubzilla-e50e68719155c7d35e30bb203a403854f789d5a1.tar.gz
volse-hubzilla-e50e68719155c7d35e30bb203a403854f789d5a1.tar.bz2
volse-hubzilla-e50e68719155c7d35e30bb203a403854f789d5a1.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/uexport.php')
-rw-r--r--mod/uexport.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/uexport.php b/mod/uexport.php
index 8217a17c4..df66474f1 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)) > 0 && 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"' );
+ header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . '.json"' );
if($year) {
- echo json_encode(identity_export_year(local_channel(),$year));
+ echo json_encode(identity_export_year(local_channel(),$year,$month));
killme();
}