make sure aliases.csv is downloaded, and not opened in browser

SEE: http://stackoverflow.com/questions/6468517
This commit is contained in:
Daku 2015-03-20 22:16:20 +00:00 committed by Shish
parent b81d457bf7
commit 6289402f2e
2 changed files with 3 additions and 2 deletions

View file

@ -84,7 +84,8 @@ class AliasEditor extends Extension {
}
else if($event->get_arg(0) == "export") {
$page->set_mode("data");
$page->set_type("text/plain");
$page->set_type("text/csv");
$page->set_filename("aliases.csv");
$page->set_data($this->get_alias_csv($database));
}
else if($event->get_arg(0) == "import") {

View file

@ -55,7 +55,7 @@ class AliasEditorTheme extends Themelet {
<tbody>$h_aliases</tbody>
<tfoot>$h_add</tfoot>
</table>
<p><a href='".make_link("alias/export/aliases.csv")."'>Download as CSV</a></p>
<p><a href='".make_link("alias/export/aliases.csv")."' download='aliases.csv'>Download as CSV</a></p>
";
$bulk_html = "