Skip to content

Commit

Permalink
Merge pull request #12 from mageplaza/2.3-develop
Browse files Browse the repository at this point in the history
v1.0.7
  • Loading branch information
DHT-Uri authored Jul 9, 2021
2 parents 959db4f + afe433c commit 5594de7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 30 deletions.
15 changes: 12 additions & 3 deletions Controller/Adminhtml/System/Config/Geoip.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Magento\Framework\Controller\Result\Json;
use Magento\Framework\Controller\Result\JsonFactory;
use Mageplaza\GeoIP\Helper\Data as HelperData;
use Psr\Log\LoggerInterface;
use PharData;
use function stream_get_wrappers;
use function stream_wrapper_restore;
Expand All @@ -53,23 +54,30 @@ class Geoip extends Action
*/
protected $_helperData;

/**
* @var LoggerInterface
*/
protected $_logger;

/**
* Geoip constructor.
*
* @param Context $context
* @param JsonFactory $resultJsonFactory
* @param DirectoryList $directoryList
* @param HelperData $helperData
* @param LoggerInterface $logger
*/
public function __construct(
Context $context,
JsonFactory $resultJsonFactory,
DirectoryList $directoryList,
HelperData $helperData
HelperData $helperData,
LoggerInterface $logger
) {
$this->resultJsonFactory = $resultJsonFactory;
$this->_directoryList = $directoryList;
$this->_helperData = $helperData;
$this->_logger = $logger;

parent::__construct($context);
}
Expand Down Expand Up @@ -107,7 +115,8 @@ public function execute()
$status = true;
$message = __('Download library success!');
} catch (Exception $e) {
$message = __('Can\'t download file. Please try again! %1', $e->getMessage());
$this->_logger->info($e->getMessage());
$message = __('Can\'t download file. Please try again! <br> You can find out more in the error log.' );
}

/** @var Json $result */
Expand Down
54 changes: 27 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "mageplaza/module-geoip",
"description": "Magento 2 GEO IP Extension",
"require": {
"mageplaza/module-core": "^1.4.5",
"geoip2/geoip2": "~2.0"
},
"type": "magento2-module",
"version": "1.0.6",
"license": "proprietary",
"authors": [
{
"name": "Mageplaza",
"email": "[email protected]",
"homepage": "https://www.mageplaza.com",
"role": "Technical Support"
}
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Mageplaza\\GeoIP\\": ""
}
}
}
{
"name": "mageplaza/module-geoip",
"description": "Magento 2 GEO IP Extension",
"require": {
"mageplaza/module-core": "^1.4.5",
"geoip2/geoip2": "~2.0"
},
"type": "magento2-module",
"version": "1.0.7",
"license": "proprietary",
"authors": [
{
"name": "Mageplaza",
"email": "[email protected]",
"homepage": "https://www.mageplaza.com",
"role": "Technical Support"
}
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Mageplaza\\GeoIP\\": ""
}
}
}

0 comments on commit 5594de7

Please sign in to comment.