Skip to content

Commit

Permalink
Version 6.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Aug 8, 2021
1 parent 772ae8b commit 93fb821
Show file tree
Hide file tree
Showing 44 changed files with 93 additions and 64 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ For more information, go to https://www.luigifab.fr/apijs and https://www.luigif

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

- Current version: 6.7.0 (07/07/2021)
- Compatibility: OpenMage 19.x / 20.x, PHP 7.2 / 7.3 / 7.4 / 8.0, Python 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9
- Current version: 6.8.0 (08/08/2021)
- Compatibility: OpenMage 19.x / 20.x, PHP 7.2 / 7.3 / 7.4 / 8.0, Python 3.3 - 3.10
- 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)
- Other translations: Czech (cs), Dutch (nl), Japanese (ja), Polish (pl), Slovak (sk)
- Other translations: Chinese (zh), Russian (ru), Turkish (tr), Ukrainian (uk)
- 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)
- License: GNU GPL 2+

If you like, take some of your time to improve the translations, go to https://bit.ly/2HyCCEc.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
["src/app/locale/de_AT/Luigifab_Apijs.csv", "app/locale/de_AT/Luigifab_Apijs.csv"],
["src/app/locale/de_CH/Luigifab_Apijs.csv", "app/locale/de_CH/Luigifab_Apijs.csv"],
["src/app/locale/de_DE/Luigifab_Apijs.csv", "app/locale/de_DE/Luigifab_Apijs.csv"],
["src/app/locale/el_GR/Luigifab_Apijs.csv", "app/locale/el_GR/Luigifab_Apijs.csv"],
["src/app/locale/es_AR/Luigifab_Apijs.csv", "app/locale/es_AR/Luigifab_Apijs.csv"],
["src/app/locale/es_CL/Luigifab_Apijs.csv", "app/locale/es_CL/Luigifab_Apijs.csv"],
["src/app/locale/es_CO/Luigifab_Apijs.csv", "app/locale/es_CO/Luigifab_Apijs.csv"],
Expand All @@ -56,13 +57,15 @@
["src/app/locale/fr_CA/Luigifab_Apijs.csv", "app/locale/fr_CA/Luigifab_Apijs.csv"],
["src/app/locale/fr_CH/Luigifab_Apijs.csv", "app/locale/fr_CH/Luigifab_Apijs.csv"],
["src/app/locale/fr_FR/Luigifab_Apijs.csv", "app/locale/fr_FR/Luigifab_Apijs.csv"],
["src/app/locale/hu_HU/Luigifab_Apijs.csv", "app/locale/hu_HU/Luigifab_Apijs.csv"],
["src/app/locale/it_CH/Luigifab_Apijs.csv", "app/locale/it_CH/Luigifab_Apijs.csv"],
["src/app/locale/it_IT/Luigifab_Apijs.csv", "app/locale/it_IT/Luigifab_Apijs.csv"],
["src/app/locale/ja_JP/Luigifab_Apijs.csv", "app/locale/ja_JP/Luigifab_Apijs.csv"],
["src/app/locale/nl_NL/Luigifab_Apijs.csv", "app/locale/nl_NL/Luigifab_Apijs.csv"],
["src/app/locale/pl_PL/Luigifab_Apijs.csv", "app/locale/pl_PL/Luigifab_Apijs.csv"],
["src/app/locale/pt_BR/Luigifab_Apijs.csv", "app/locale/pt_BR/Luigifab_Apijs.csv"],
["src/app/locale/pt_PT/Luigifab_Apijs.csv", "app/locale/pt_PT/Luigifab_Apijs.csv"],
["src/app/locale/ro_RO/Luigifab_Apijs.csv", "app/locale/ro_RO/Luigifab_Apijs.csv"],
["src/app/locale/ru_RU/Luigifab_Apijs.csv", "app/locale/ru_RU/Luigifab_Apijs.csv"],
["src/app/locale/sk_SK/Luigifab_Apijs.csv", "app/locale/sk_SK/Luigifab_Apijs.csv"],
["src/app/locale/tr_TR/Luigifab_Apijs.csv", "app/locale/tr_TR/Luigifab_Apijs.csv"],
Expand Down
24 changes: 12 additions & 12 deletions src/app/code/community/Luigifab/Apijs/Helper/Rewrite/Image.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created J/12/09/2019
* Updated V/18/06/2021
* Updated V/30/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* Copyright 2019-2021 | Fabrice Creuzot <fabrice~cellublue~com>
Expand Down Expand Up @@ -31,7 +31,7 @@ public function init($product, $attribute, $path = null, $fixed = true) {
//if (!isset($this->_debugRenew)) $this->_debugRenew = 0;
//$this->_debugCount += 1;
//$this->_debugStart = microtime(true);
//Mage::log('Open file '.$path.'...');
//Mage::log('Open file '.$path.'...', Zend_Log::DEBUG);

if (empty($this->_helper)) {
$this->_helper = Mage::helper('apijs');
Expand Down Expand Up @@ -187,11 +187,11 @@ public function setBaseFile() {
Mage::getDesign()->setArea($area);
}

//Mage::log(' setBaseFile '.number_format(microtime(true) - $go, 4));
//Mage::log(' setBaseFile '.number_format(microtime(true) - $go, 4), Zend_Log::DEBUG);
return $this;
}

public function cleanUrl($url) {
public function cleanUrl(string $url) {
return $this->_cleanUrl ? mb_substr($url, strpos($url, '/', 9)) : $url;
}

Expand Down Expand Up @@ -226,11 +226,11 @@ public function __toString() {
mb_substr($filename, mb_stripos($filename, '/'.$dir.'/') + mb_strlen('/'.$dir.'/')));

if (array_key_exists($filename, $this->_cacheUrls)) {
//Mage::log(' CACHE HIT '.$filename); $this->_debugCache++;
//Mage::log(' CACHE HIT '.$filename, Zend_Log::DEBUG); $this->_debugCache++;
$url = $this->_cacheUrls[$filename];
}
else {
//Mage::log(' generate '.$filename); $this->_debugRenew++;
//Mage::log(' generate '.$filename, Zend_Log::DEBUG); $this->_debugRenew++;
if (!is_file($filename)) {

if (!empty($this->_scheduleRotate))
Expand Down Expand Up @@ -265,11 +265,11 @@ public function __toString() {
$filename = str_replace(['../', '//', '/category/', '/catalog/product/'], ['', '/', '/', '/catalog/category/'], $filename);

if (array_key_exists($filename, $this->_cacheUrls)) {
//Mage::log(' CACHE HIT '.$filename); $this->_debugCache++;
//Mage::log(' CACHE HIT '.$filename, Zend_Log::DEBUG); $this->_debugCache++;
$url = $this->_cacheUrls[$filename];
}
else {
//Mage::log(' generate '.$filename); $this->_debugRenew++;
//Mage::log(' generate '.$filename, Zend_Log::DEBUG); $this->_debugRenew++;
if (!is_file($filename)) {

if (!empty($this->_scheduleRotate))
Expand Down Expand Up @@ -303,11 +303,11 @@ public function __toString() {
$filename = preg_replace('#/cache/\d+/#', '/cache/', $filename);

if (array_key_exists($filename, $this->_cacheUrls)) {
//Mage::log(' CACHE HIT '.$filename); $this->_debugCache++;
//Mage::log(' CACHE HIT '.$filename, Zend_Log::DEBUG); $this->_debugCache++;
$url = $this->_cacheUrls[$filename];
}
else {
//Mage::log(' generate '.$filename); $this->_debugRenew++;
//Mage::log(' generate '.$filename, Zend_Log::DEBUG); $this->_debugRenew++;
if (!is_file($filename)) {

if (!empty($this->_scheduleRotate))
Expand Down Expand Up @@ -337,8 +337,8 @@ public function __toString() {
$url = Mage::getDesign()->getSkinUrl($this->getPlaceholder());
}

//Mage::log(' toString '.number_format(microtime(true) - $go, 4));
//Mage::log(' closing file after '.number_format(microtime(true) - $this->_debugStart, 4).' / since first init '.number_format(microtime(true) - $this->_debugBegin, 4).' / total '.$this->_debugCount.' = cache '.$this->_debugCache.' + generate '.$this->_debugRenew);
//Mage::log(' toString '.number_format(microtime(true) - $go, 4), Zend_Log::DEBUG);
//Mage::log(' closing file after '.number_format(microtime(true) - $this->_debugStart, 4).' / since first init '.number_format(microtime(true) - $this->_debugBegin, 4).' / total '.$this->_debugCount.' = cache '.$this->_debugCache.' + generate '.$this->_debugRenew, Zend_Log::DEBUG);

return $url;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Apijs/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 S/19/11/2011
* Updated D/30/05/2021
* Updated V/02/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/apijs
Expand All @@ -20,7 +20,7 @@
<config>
<modules>
<Luigifab_Apijs>
<version>6.7.0</version>
<version>6.8.0</version>
</Luigifab_Apijs>
</modules>
<global>
Expand Down
4 changes: 1 addition & 3 deletions src/app/code/community/Luigifab/Apijs/etc/system.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Created D/20/11/2011
* Updated W/03/03/2021
* Updated S/03/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/apijs
Expand Down Expand Up @@ -46,7 +46,6 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<expanded>1</expanded>
<fields>
<demo>
<frontend_model>apijs/adminhtml_demo</frontend_model>
Expand Down Expand Up @@ -141,7 +140,6 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<expanded>1</expanded>
<fields>
<enabled translate="label">
<label>Enable</label>
Expand Down
5 changes: 5 additions & 0 deletions src/app/code/community/Luigifab/Apijs/readme
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Files and directories
- app/locale/de_AT/Luigifab_Apijs.csv
- app/locale/de_CH/Luigifab_Apijs.csv
- app/locale/de_DE/Luigifab_Apijs.csv
- app/locale/el_GR/Luigifab_Apijs.csv
- app/locale/es_AR/Luigifab_Apijs.csv
- app/locale/es_CL/Luigifab_Apijs.csv
- app/locale/es_CO/Luigifab_Apijs.csv
Expand All @@ -59,13 +60,15 @@ Files and directories
- app/locale/fr_CA/Luigifab_Apijs.csv
- app/locale/fr_CH/Luigifab_Apijs.csv
- app/locale/fr_FR/Luigifab_Apijs.csv
- app/locale/hu_HU/Luigifab_Apijs.csv
- app/locale/it_CH/Luigifab_Apijs.csv
- app/locale/it_IT/Luigifab_Apijs.csv
- app/locale/ja_JP/Luigifab_Apijs.csv
- app/locale/nl_NL/Luigifab_Apijs.csv
- app/locale/pl_PL/Luigifab_Apijs.csv
- app/locale/pt_BR/Luigifab_Apijs.csv
- app/locale/pt_PT/Luigifab_Apijs.csv
- app/locale/ro_RO/Luigifab_Apijs.csv
- app/locale/ru_RU/Luigifab_Apijs.csv
- app/locale/sk_SK/Luigifab_Apijs.csv
- app/locale/tr_TR/Luigifab_Apijs.csv
Expand Down Expand Up @@ -132,4 +135,6 @@ License: MIT (https://opensource.org/licenses/mit)

Files: /skin/*/default/default/fonts/luigifab/apijs/fontello.woff /skin/*/default/default/fonts/luigifab/apijs/fontello.woff2
Source: http://fontello.com/
Copyright: Font Awesome 2016 Dave Gandy
Copyright: Iconic 2012 P.J. Onori
License: SIL (https://opensource.org/licenses/ofl-1.1)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created J/05/09/2019
* Updated V/18/06/2021
* Updated J/22/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* Copyright 2019-2021 | Fabrice Creuzot <fabrice~cellublue~com>
Expand Down Expand Up @@ -31,8 +31,7 @@
set_time_limit(0);

try {
$read = $this->getConnection();
$fields = $read->fetchAll('SHOW COLUMNS FROM '.$this->getTable('catalog_product_entity_media_gallery_value'));
$fields = $this->getConnection()->fetchAll('SHOW COLUMNS FROM '.$this->getTable('catalog_product_entity_media_gallery_value'));

foreach ($fields as $field) {
if ((empty($field['Null']) || ($field['Null'] != 'YES')) && (mb_stripos($field['Field'], '_id') === false)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/19/03/2016
* Updated D/24/05/2020
* Updated J/05/08/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/apijs
Expand All @@ -23,7 +23,7 @@
$data = $this->getBrowserData();

if (!empty($data['browser']) && !empty($data['version'])) {
$data['version'] = empty(Mage::app()->getRequest()->getParam('browser')) ? (float) $data['version'] : 1;
$data['version'] = empty($this->getRequest()->getParam('browser')) ? (float) $data['version'] : 1;
if (($data['browser'] == 'MSIE') && ($data['version'] < 15)) {
$text = $this->__('<strong>Warning:</strong> your browser <strong>%s %s</strong> is outdated, please <a %s>upgrade your browser</a>.', 'Internet Explorer', $data['version'], 'href="https://www.microsoft.com/windows/microsoft-edge"');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/04/10/2014
* Updated V/19/03/2021
* Updated J/29/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* Copyright 2019-2021 | Fabrice Creuzot <fabrice~cellublue~com>
Expand Down Expand Up @@ -378,9 +378,7 @@ $exclude = empty($sid) ? 'false' : '\''.$help->escapeEntities($this->__('Automat
<?php if ($globalValue == $path): ?>
<label>
<?php echo trim($this->__('[GLOBAL]'), '[]') ?>
<input type="checkbox" <?php
echo (empty($storeValue) || ($globalValue == $path)) ? 'checked="checked"' : '';
?> disabled="disabled" class="check" />
<input type="checkbox" checked="checked" disabled="disabled" class="check" />
</label>
<?php else: ?>
<label style="visibility:hidden;">
Expand Down
10 changes: 8 additions & 2 deletions src/app/design/frontend/base/default/layout/luigifab/apijs.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Created S/19/11/2011
* Updated D/31/05/2020
* Updated V/30/07/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/apijs
Expand Down Expand Up @@ -41,7 +41,13 @@
</action>
</reference>
<reference name="after_body_start">
<block type="apijs/browser" template="luigifab/apijs/browser.phtml" name="apijs_browser" before="-" />
<block type="apijs/browser" template="luigifab/apijs/browser.phtml" name="apijs_browser" before="-">
<action method="setEsiOptions">
<params>
<access>private</access>
</params>
</action>
</block>
</reference>
</default>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/19/03/2016
* Updated D/24/05/2020
* Updated J/05/08/2021
*
* Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/apijs
Expand All @@ -23,7 +23,7 @@
$data = $this->getBrowserData();

if (!empty($data['browser']) && !empty($data['version'])) {
$data['version'] = empty(Mage::app()->getRequest()->getParam('browser')) ? (float) $data['version'] : 1;
$data['version'] = empty($this->getRequest()->getParam('browser')) ? (float) $data['version'] : 1;
if (($data['browser'] == 'MSIE') && ($data['version'] < 15)) {
$text = $this->__('<strong>Warning:</strong> your browser <strong>%s %s</strong> is outdated, please <a %s>upgrade your browser</a>.', 'Internet Explorer', $data['version'], 'href="https://www.microsoft.com/windows/microsoft-edge"');
}
Expand Down
3 changes: 3 additions & 0 deletions src/app/locale/el_GR/Luigifab_Apijs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"INCOMPLETE MODULE INSTALLATION","ΕΛΛΙΠΉΣ ΕΓΚΑΤΆΣΤΑΣΗ ΜΟΝΆΔΑΣ"
"There is conflict (<em>%s</em>).","Υπάρχει ασυμφωνία (<em>%s</em>)."
"Website: %s","Ιστότοπος: %s"
7 changes: 7 additions & 0 deletions src/app/locale/hu_HU/Luigifab_Apijs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"INCOMPLETE MODULE INSTALLATION","SIKERTELEN MODUL TELEPÍTÉS"
"There is conflict (<em>%s</em>).","Probléma merült fel (<em>%s</em>)."
"Example %d","Ppéldául %d"
"Website: %s","Weboldal: %s"
"%d image","%d kép"
" %d images","%d kép"
"%d images","%d kép"
6 changes: 6 additions & 0 deletions src/app/locale/ro_RO/Luigifab_Apijs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"INCOMPLETE MODULE INSTALLATION","INSTALARE INCOMPLETĂ"
"There is conflict (<em>%s</em>).","Există un conflict (<em>%s</em>)."
"PHP manual","Manualul PHP"
"It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination.","Este important să știți că cu toate că mesajul a fost acceptat spre trimitere, aceasta NU înseamnă că mesajul într-adevăr va ajunge la destinație."
"Example %d","Exemplu %d"
"Website: %s","Site: %s"
3 changes: 3 additions & 0 deletions src/app/locale/ru_RU/Luigifab_Apijs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"Update on hover","Обновлять при наведении"
"Main picture","Основное изображение"
"Thumbnails","Миниатюры"
"%s kB","%s Кб"
"%s MB","%s Мб"
"%s GB","%s ГБ"
"[strong]Warning[/strong], the following files were not saved:","[strong]Внимание[/strong], эти файлы не сохранены:"
"[strong]However[/strong], the following files were successfully saved:","[strong]Однако[/strong], эти файлы были успешно сохранены:"
"Add one or multiple files","Добавьте один или несколько файлов"
Expand Down
3 changes: 3 additions & 0 deletions src/app/locale/uk_UA/Luigifab_Apijs.csv
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
"%s kB","%s кБ"
"%s MB","%s МБ"
"%s GB","%s ГБ"
"Website: %s","Вебсайт: %s"
Loading

0 comments on commit 93fb821

Please sign in to comment.