Skip to content

Commit fbfe0a9

Browse files
committed
ACP2E-2015: Customizable Option Image link is broken
1 parent 9a23f2d commit fbfe0a9

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
*/
77
namespace Magento\Backup\Controller\Adminhtml\Index;
88

9+
use Magento\Framework\App\Action\HttpGetActionInterface;
910
use Magento\Framework\App\Filesystem\DirectoryList;
1011

11-
class Download extends \Magento\Backup\Controller\Adminhtml\Index
12+
class Download extends \Magento\Backup\Controller\Adminhtml\Index implements HttpGetActionInterface
1213
{
1314
/**
1415
* @var \Magento\Framework\Controller\Result\RawFactory
@@ -66,17 +67,12 @@ public function execute()
6667

6768
$fileName = $this->_objectManager->get(\Magento\Backup\Helper\Data::class)->generateBackupDownloadName($backup);
6869

69-
$this->_fileFactory->create(
70+
return $this->_fileFactory->create(
7071
$fileName,
71-
null,
72+
$backup->output(),
7273
DirectoryList::VAR_DIR,
7374
'application/octet-stream',
7475
$backup->getSize()
7576
);
76-
77-
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
78-
$resultRaw = $this->resultRawFactory->create();
79-
$resultRaw->setContents($backup->output());
80-
return $resultRaw;
8177
}
8278
}

app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function __construct(
4747
*/
4848
public function execute()
4949
{
50+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5051
$fileName = basename($this->getRequest()->getParam('filename'));
5152

5253
/** @var \Magento\ImportExport\Helper\Report $reportHelper */
@@ -59,17 +60,12 @@ public function execute()
5960
return $resultRedirect;
6061
}
6162

62-
$this->fileFactory->create(
63+
return $this->fileFactory->create(
6364
$fileName,
64-
null,
65+
$reportHelper->getReportOutput($fileName),
6566
DirectoryList::VAR_IMPORT_EXPORT,
6667
'application/octet-stream',
6768
$reportHelper->getReportSize($fileName)
6869
);
69-
70-
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
71-
$resultRaw = $this->resultRawFactory->create();
72-
$resultRaw->setContents($reportHelper->getReportOutput($fileName));
73-
return $resultRaw;
7470
}
7571
}

app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function execute()
9797
$secretKey = $this->getRequest()->getParam('key');
9898

9999
if ($secretKey == $info['secret_key']) {
100-
$this->_fileResponseFactory->create(
100+
return $this->_fileResponseFactory->create(
101101
$info['title'],
102102
['value' => $info['quote_path'], 'type' => 'filename'],
103103
DirectoryList::MEDIA,

0 commit comments

Comments
 (0)