diff --git a/Controller/Adminhtml/Ajax/RetrieveImage.php b/Controller/Adminhtml/Ajax/RetrieveImage.php index b96f0d1..5c46cfd 100644 --- a/Controller/Adminhtml/Ajax/RetrieveImage.php +++ b/Controller/Adminhtml/Ajax/RetrieveImage.php @@ -4,7 +4,6 @@ use Magento\Backend\App\Action\Context; use Magento\Catalog\Model\Product\Media\Config as ProductMediaConfig; -use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Controller\Result\RawFactory as ResultRawFactory; use Magento\Framework\Exception\LocalizedException; @@ -22,7 +21,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class RetrieveImage extends \Magento\Backend\App\Action implements HttpPostActionInterface +class RetrieveImage extends \Magento\Backend\App\Action { /** * @var ResultRawFactory diff --git a/Model/BatchDownloader.php b/Model/BatchDownloader.php index 7d2685f..01409b8 100644 --- a/Model/BatchDownloader.php +++ b/Model/BatchDownloader.php @@ -146,9 +146,6 @@ public function __construct( $this->_extensionValidator = $extensionValidator; $this->_synchronizationChecker = $synchronizationChecker; $this->_synchronisationRepository = $synchronisationRepository; - if ($this->_configuration->isEnabled()) { - $this->_authorise(); - } } private function _authorise() @@ -167,6 +164,10 @@ private function _authorise() */ public function downloadUnsynchronisedImages(OutputInterface $output = null, $override = false) { + if ($this->_configuration->isEnabled()) { + $this->_authorise(); + } + //= Config $this->_output = $output; $this->_override = (bool) $override; diff --git a/Model/Configuration.php b/Model/Configuration.php index b03e30e..b073791 100644 --- a/Model/Configuration.php +++ b/Model/Configuration.php @@ -199,7 +199,7 @@ public function getCdnSubdomainStatus() */ public function getUserPlatform() { - return sprintf(self::USER_PLATFORM_TEMPLATE, '1.9.1', '2.0.0'); + return sprintf(self::USER_PLATFORM_TEMPLATE, '1.9.2', '2.0.0'); } /** diff --git a/Model/ImageRepository.php b/Model/ImageRepository.php index 69ad711..0a8a97a 100644 --- a/Model/ImageRepository.php +++ b/Model/ImageRepository.php @@ -61,7 +61,7 @@ public function findUnsynchronisedImages() private function getRecursiveIterator($directory) { return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory), + new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST ); } diff --git a/composer.json b/composer.json index 3ee3111..8abfb61 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "cloudinary/cloudinary-magento2", "description": "Cloudinary Magento 2 Integration.", "type": "magento2-module", - "version": "1.9.1", + "version": "1.9.2", "license": "MIT", "require": { "cloudinary/cloudinary_php": "*" diff --git a/etc/module.xml b/etc/module.xml index 4460b20..83d7a65 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/marketplace.composer.json b/marketplace.composer.json index 7245e00..bfd7a20 100644 --- a/marketplace.composer.json +++ b/marketplace.composer.json @@ -1,7 +1,7 @@ { "name": "cloudinary/cloudinary", "type": "magento2-module", - "version": "1.9.1", + "version": "1.9.2", "description": "Cloudinary Magento 2 Integration.", "license": "MIT", "require": {