1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-26 23:54:25 +01:00

Bookmark: change export file name fix #147

This commit is contained in:
Brice Maron 2012-11-08 21:53:51 +00:00
parent dea879eb16
commit 64799d8741

View File

@ -41,11 +41,11 @@ foreach($bookmarks as $bm) {
if($bm['description']) if($bm['description'])
$file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8'); $file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8');
} }
$export_name = "owncloud-bookmarks-".date('Y-m-d').'.html';
header("Cache-Control: private"); header("Cache-Control: private");
header("Content-Type: application/stream"); header("Content-Type: application/stream");
header("Content-Length: ".$fileSize); header("Content-Length: ".$fileSize);
header("Content-Disposition: attachment; filename=oc-bookmarks.html"); header("Content-Disposition: attachment; filename=".$export_name);
echo $file; echo $file;
exit; exit;