// Refacto AttachementController

This commit is contained in:
rMalie committed 2011-09-28 16:19:50 +00:00
1 parent ec34ad9328
commit 8d274c9cbf
1 file changed
+3 -3
+3 -3
View File
@@ -1,6 +1,6 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2011 PrestaShop
* *
* NOTICE OF LICENSE * NOTICE OF LICENSE
* *
@@ -27,12 +27,12 @@
class AttachmentControllerCore extends FrontController class AttachmentControllerCore extends FrontController
{ {
public function process() public function postProcess()
{ {
$a = new Attachment(Tools::getValue('id_attachment'), $this->context->language->id); $a = new Attachment(Tools::getValue('id_attachment'), $this->context->language->id);
if (!$a->id) if (!$a->id)
Tools::redirect('index.php'); Tools::redirect('index.php');
header('Content-Transfer-Encoding: binary'); header('Content-Transfer-Encoding: binary');
header('Content-Type: '.$a->mime); header('Content-Type: '.$a->mime);
header('Content-Length: '.filesize(_PS_DOWNLOAD_DIR_.$a->file)); header('Content-Length: '.filesize(_PS_DOWNLOAD_DIR_.$a->file));