Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config backend model PDF file name extension #24153

Merged
merged 4 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/code/Magento/Config/Model/Config/Backend/File/Pdf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Config\Model\Config\Backend\Image;

/**
* @api
*/
class Pdf extends \Magento\Config\Model\Config\Backend\File
{
/**
* @return string[]
*/
protected function _getAllowedExtensions()
{
return ['pdf'];
}
}
10 changes: 3 additions & 7 deletions app/code/Magento/Config/Model/Config/Backend/Image/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
* See COPYING.txt for license details.
*/

/**
* System config image field backend model for Zend PDF generator
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Config\Model\Config\Backend\Image;

/**
* @api
* @since 100.0.2
* @deprecated The wrong file type extensions are returned.
* @see \Magento\Config\Model\Config\Backend\File\Pdf
*/
class Pdf extends \Magento\Config\Model\Config\Backend\Image
{
Expand All @@ -22,6 +18,6 @@ class Pdf extends \Magento\Config\Model\Config\Backend\Image
*/
protected function _getAllowedExtensions()
{
return ['tif', 'tiff', 'png', 'jpg', 'jpe', 'jpeg'];
return ['tif', 'tiff', 'png', 'jpg', 'jpe', 'jpeg', 'pdf'];
}
}