Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp to export-filename #1078

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- RSS feed will be fetched more reliably ([#1052](https://github.com/SSilence/selfoss/pull/1052))
- More of user interface is now translatable ([#1054](https://github.com/SSilence/selfoss/pull/1054))
- Open Sans font is no longer bundled, resulting in smaller installations. Additionally, `use_system_font` option was removed. The typeface is still set as the default font family, so if you want to use it, install it to your devices. If you want to use a different typeface, add `body { font-family: 'Foo Face'; }` to your `user.css`. ([#1072](https://github.com/SSilence/selfoss/pull/1072))
- The file name of exported sources now includes a timestamp ([#1078](https://github.com/SSilence/selfoss/pull/1078))


## 2.18 – 2018-03-05
Expand Down
3 changes: 2 additions & 1 deletion controllers/Opml.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ public function export() {
\F3::get('logger')->debug('finished OPML export');

// save content as file and suggest file name
header('Content-Disposition: attachment; filename="selfoss-subscriptions.xml"');
$exportName = 'selfoss-subscriptions-' . date('YmdHis') . '.xml';
header('Content-Disposition: attachment; filename="' . $exportName . '"');
header('Content-Type: text/xml; charset=UTF-8');
echo $this->writer->outputMemory();
}
Expand Down