Skip to content

Commit

Permalink
Version 4.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Oct 10, 2023
1 parent db2d818 commit 2db9c1d
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 36 deletions.
1 change: 0 additions & 1 deletion FUNDING.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ For more information, go to https://www.luigifab.fr/openmage/versioning (IPv6 is

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

- Current version: 4.5.2 (06/06/2023)
- Compatibility: OpenMage 19.x / 20.x / 21.x, PHP 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2
- Current version: 4.5.3 (10/10/2023)
- Compatibility: OpenMage 19.x / 20.x / 21.x, PHP 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3
- 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)
- License: GNU GPL 2+
Expand Down
14 changes: 0 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@
"issues": "https://github.com/luigifab/openmage-versioning/issues",
"docs": "https://www.luigifab.fr/openmage/versioning"
},
"funding": [
{
"type": "other",
"url": "https://gandi.link/f/4b904048"
},
{
"type": "other",
"url": "https://fr.tipeee.com/luigifab"
},
{
"type": "other",
"url": "https://ekwateur.fr/?parrain=EKW001147103"
}
],
"require": {
"php": ">=7.2.0",
"openmage/magento-lts": ">=19.4.0 || main-dev || next-dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created V/23/05/2014
* Updated V/24/06/2022
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -37,7 +37,7 @@ protected function checkChanges() {
$index = file_get_contents(getenv('SCRIPT_FILENAME') ?? BP.'/index.php');
if (!str_contains($index, '::f{4}:\\d{1,3}'))
return 'index.php';
if (!str_contains($index, '? substr($ip, 7)'))
if (!str_contains($index, '? substr($ip, 7)')) // not mb_substr
return 'index.php';
if (!str_contains($index, '$ip = empty($ip) ? getenv(\'REMOTE_ADDR\')'))
return 'index.php';
Expand Down
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Versioning/Helper/Data.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/03/12/2011
* Updated J/05/01/2023
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -214,7 +214,7 @@ public function getIpAddr() {

$ip = empty(getenv('HTTP_X_FORWARDED_FOR')) ? false : explode(',', getenv('HTTP_X_FORWARDED_FOR'));
$ip = empty($ip) ? getenv('REMOTE_ADDR') : reset($ip);
$ip = (preg_match('#^::f{4}:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $ip) === 1) ? substr($ip, 7) : $ip;
$ip = (preg_match('#^::f{4}:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $ip) === 1) ? substr($ip, 7) : $ip; // not mb_substr

return $ip;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Versioning/Model/Observer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created J/31/05/2012
* Updated J/05/01/2023
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -150,7 +150,7 @@ protected function updateIpConfig(array $global) {
continue;

if (str_contains($key, '_byip')) {
$key = substr($key, 0, strrpos($key, '_'));
$key = substr($key, 0, strrpos($key, '_')); // not mb_substr mb_strrpos
$value = array_filter(preg_split('#\s+#', $value));
$config[$key][] = '-'.implode("-\n-", $value).'-';
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created M/27/12/2011
* Updated L/24/04/2023
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -32,8 +32,8 @@ public function toOptionArray() {
foreach ($keys as $key) {
$system = Mage::getSingleton($key);
$this->_options[$key] = ['value' => $key, 'label' => $system->isSoftwareInstalled() ?
$help->__('%s (%s)', strtoupper($system->getType()), $system->getSoftwareVersion()) :
$help->__('%s (not available)', strtoupper($system->getType()))];
$help->__('%s (%s)', strtoupper($system->getType()), $system->getSoftwareVersion()) : // not mb_strtoupper
$help->__('%s (not available)', strtoupper($system->getType()))]; // not mb_strtoupper
}

ksort($this->_options);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/03/12/2011
* Updated S/19/11/2022
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -141,7 +141,7 @@ public function upgradeAction() {
return $this->_redirect('*/versioning_repository/index');
}

$locale = substr(Mage::getSingleton('core/locale')->getLocaleCode(), 0, 2);
$locale = substr(Mage::getSingleton('core/locale')->getLocaleCode(), 0, 2); // not mb_substr
$upgrade = Mage::getSingleton('versioning/upgrade')->disableAllBuffer();

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
Expand Down
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Versioning/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/03/12/2011
* Updated V/03/03/2023
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand All @@ -20,7 +20,7 @@
<config>
<modules>
<Luigifab_Versioning>
<version>4.5.2</version>
<version>4.5.3</version>
</Luigifab_Versioning>
</modules>
<global>
Expand Down
4 changes: 2 additions & 2 deletions src/errors/page.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created W/30/05/2012
* Updated S/14/01/2023
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand All @@ -20,7 +20,7 @@
if (!is_object($this))
exit(0);

$locale = substr($this->getData('locale'), 0, 2);
$locale = substr($this->getData('locale'), 0, 2); // not mb_substr

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $locale ?>" lang="<?php echo $locale ?>">
Expand Down
9 changes: 5 additions & 4 deletions src/errors/processor.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created J/12/08/2010
* Updated L/26/12/2022
* Updated J/21/09/2023
*
* Copyright 2011-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://github.com/luigifab/openmage-versioning
Expand Down Expand Up @@ -32,7 +32,7 @@ public function init(string $type) {

$ip = empty(getenv('HTTP_X_FORWARDED_FOR')) ? false : explode(',', getenv('HTTP_X_FORWARDED_FOR'));
$ip = empty($ip) ? getenv('REMOTE_ADDR') : reset($ip);
$ip = (preg_match('#^::f{4}:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $ip) === 1) ? substr($ip, 7) : $ip;
$ip = (preg_match('#^::f{4}:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $ip) === 1) ? substr($ip, 7) : $ip; // not mb_substr

$this->setData('ip', $ip);
$this->setData('type', $type);
Expand Down Expand Up @@ -158,7 +158,7 @@ public function saveReport(array $data, $t = null) {
// data['url'] = getenv('REQUEST_URI')
// data['skin'] = app()->getStore()->getData('code')
// data['script_name'] = getenv('SCRIPT_NAME')
$text = str_replace('^', chr(194).chr(160), implode("\n", [
$text = str_replace('^', chr(194).chr(160), implode("\n", [ // not mb_chr
$data[0],
$data[1],
'- - - -',
Expand Down Expand Up @@ -212,7 +212,7 @@ public function canShowReport() {
return $txt;

$ips = './config/report.ip';
if (is_file($ips) && (stripos(file_get_contents($ips), '-'.$this->getData('ip').'-') !== false))
if (is_file($ips) && (stripos(file_get_contents($ips), '-'.$this->getData('ip').'-') !== false)) // not mb_stripos
return $txt;
}

Expand Down Expand Up @@ -240,6 +240,7 @@ protected function searchCurrentLocale(array $locales, string $result = 'en_US')

// recherche des préférences dans HTTP_ACCEPT_LANGUAGE
// https://stackoverflow.com/a/33748742
// no mb_functions for locale codes
if (!empty(getenv('HTTP_ACCEPT_LANGUAGE'))) {

$codes = array_reduce(
Expand Down

0 comments on commit 2db9c1d

Please sign in to comment.