// Refacto AttachementController

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8857 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-28 16:19:50 +00:00
parent 2b96479279
commit 36088f9e6c
+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));