Skip to content

Commit

Permalink
Version 4.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Mar 3, 2023
1 parent 07e93be commit 85f7c33
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For more information, go to https://www.luigifab.fr/openmage/minifier (IPv6 is r

This repository is a releases mirror. To install the module, please use the composer key available in the documentation.

- Current version: 4.4.1 (02/02/2023)
- Current version: 4.4.2 (03/03/2023)
- Compatibility: OpenMage 19.x / 20.x / 21.x, PHP 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2
- Client compatibility: Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+
- Translations: English (en), French (fr-FR/fr-CA), German (de), Italian (it), Portuguese (pt-PT/pt-BR), Spanish (es) / Chinese (zh), Czech (cs), Dutch (nl), Greek (el), Hungarian (hu), Japanese (ja), Polish (pl), Romanian (ro), Russian (ru), Slovak (sk), Turkish (tr), Ukrainian (uk)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created L/16/07/2018
* Updated V/11/02/2022
* Updated M/14/02/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-minifier
Expand All @@ -28,6 +28,7 @@ public function getJsSkinUrl($file) {
}

public function getTranslatorScriptContent() {
$this->_translateData = null;
return 'var Translator = new Translate('.$this->getTranslateJson().');';
}
}
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Minifier/etc/config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Created L/27/06/2011
* Updated J/05/01/2023
* Updated J/02/03/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-minifier
Expand All @@ -20,7 +20,7 @@
<config>
<modules>
<Luigifab_Minifier>
<version>4.4.1</version>
<version>4.4.2</version>
</Luigifab_Minifier>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/14/04/2018
* Updated D/11/12/2022
* Updated L/27/02/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-minifier
Expand All @@ -21,9 +21,16 @@ $dbVersion = Mage::getSingleton('core/resource')->getConnection('core_read')->fe
$browser = $this->helper('core')->isModuleEnabled('Luigifab_Apijs') ? Mage::getSingleton('apijs/useragentparser')->parse() : null;

$session = (string) Mage::getConfig()->getNode('global/session_save');
if (in_array($session, ['db', 'redis']) && $this->helper('core')->isModuleEnabled('Cm_RedisSession') &&
Mage::getConfig()->getNode('global/redis_session') && Mage::getSingleton('Cm_RedisSession_Model_Session')->hasConnection())
$session = 'redis';
if (in_array($session, ['db', 'redis']) && $this->helper('core')->isModuleEnabled('Cm_RedisSession') && Mage::getConfig()->getNode('global/redis_session')) {
try {
$model = Mage::getSingleton('Cm_RedisSession_Model_Session');
if (method_exists($model, 'hasConnection') && $model->hasConnection())
$session = 'redis';
else if (method_exists($model, 'getInfo') && $model->getInfo())
$session = 'redis';
}
catch (Throwable $t) { }
}

$cache = (string) Mage::getConfig()->getNode('global/cache/backend');
$cache = (stripos($cache, 'redis') !== false) ? 'redis' : (empty($cache) ? 'files' : $cache);
Expand Down

0 comments on commit 85f7c33

Please sign in to comment.