Skip to content

Commit

Permalink
Export: Fixed for Opera [Closed #55]
Browse files Browse the repository at this point in the history
  • Loading branch information
o5 committed Aug 19, 2013
1 parent 352046b commit aebfedc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Grido/Components/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function handleExport()
*/
public function send(\Nette\Http\IRequest $httpRequest, \Nette\Http\IResponse $httpResponse)
{
$file = $this->name . '.csv';
$data = $this->grid->getData(FALSE);
$columns = $this->grid[\Grido\Components\Columns\Column::ID]->getComponents();
$source = $this->generateCsv($data, $columns);
Expand All @@ -105,7 +106,7 @@ public function send(\Nette\Http\IRequest $httpRequest, \Nette\Http\IResponse $h
$httpResponse->setHeader('Content-Encoding', $charset);
$httpResponse->setHeader('Content-Length', strlen($source));
$httpResponse->setHeader('Content-Type', "text/csv; charset=$charset");
$httpResponse->setHeader('Content-Disposition', "attachment; filename=\"{$this->name}.csv\"");
$httpResponse->setHeader('Content-Disposition', "attachment; filename=\"$file\"; filename*=utf-8''$file");

print $source;
}
Expand Down

0 comments on commit aebfedc

Please sign in to comment.