Skip to content

Commit

Permalink
Version 4.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Aug 8, 2021
1 parent 6f2e370 commit 761a62a
Show file tree
Hide file tree
Showing 28 changed files with 74 additions and 44 deletions.
6 changes: 2 additions & 4 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/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.2.1 (07/07/2021)
- Current version: 4.2.2 (08/08/2021)
- Compatibility: OpenMage 19.x / 20.x, PHP 7.2 / 7.3 / 7.4 / 8.0
- 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 @@ -45,6 +45,7 @@
["src/app/locale/de_AT/Luigifab_Versioning.csv", "app/locale/de_AT/Luigifab_Versioning.csv"],
["src/app/locale/de_CH/Luigifab_Versioning.csv", "app/locale/de_CH/Luigifab_Versioning.csv"],
["src/app/locale/de_DE/Luigifab_Versioning.csv", "app/locale/de_DE/Luigifab_Versioning.csv"],
["src/app/locale/el_GR/Luigifab_Versioning.csv", "app/locale/el_GR/Luigifab_Versioning.csv"],
["src/app/locale/en_AU/Luigifab_Versioning.csv", "app/locale/en_AU/Luigifab_Versioning.csv"],
["src/app/locale/en_CA/Luigifab_Versioning.csv", "app/locale/en_CA/Luigifab_Versioning.csv"],
["src/app/locale/en_GB/Luigifab_Versioning.csv", "app/locale/en_GB/Luigifab_Versioning.csv"],
Expand All @@ -63,13 +64,15 @@
["src/app/locale/fr_CA/Luigifab_Versioning.csv", "app/locale/fr_CA/Luigifab_Versioning.csv"],
["src/app/locale/fr_CH/Luigifab_Versioning.csv", "app/locale/fr_CH/Luigifab_Versioning.csv"],
["src/app/locale/fr_FR/Luigifab_Versioning.csv", "app/locale/fr_FR/Luigifab_Versioning.csv"],
["src/app/locale/hu_HU/Luigifab_Versioning.csv", "app/locale/hu_HU/Luigifab_Versioning.csv"],
["src/app/locale/it_CH/Luigifab_Versioning.csv", "app/locale/it_CH/Luigifab_Versioning.csv"],
["src/app/locale/it_IT/Luigifab_Versioning.csv", "app/locale/it_IT/Luigifab_Versioning.csv"],
["src/app/locale/ja_JP/Luigifab_Versioning.csv", "app/locale/ja_JP/Luigifab_Versioning.csv"],
["src/app/locale/nl_NL/Luigifab_Versioning.csv", "app/locale/nl_NL/Luigifab_Versioning.csv"],
["src/app/locale/pl_PL/Luigifab_Versioning.csv", "app/locale/pl_PL/Luigifab_Versioning.csv"],
["src/app/locale/pt_BR/Luigifab_Versioning.csv", "app/locale/pt_BR/Luigifab_Versioning.csv"],
["src/app/locale/pt_PT/Luigifab_Versioning.csv", "app/locale/pt_PT/Luigifab_Versioning.csv"],
["src/app/locale/ro_RO/Luigifab_Versioning.csv", "app/locale/ro_RO/Luigifab_Versioning.csv"],
["src/app/locale/ru_RU/Luigifab_Versioning.csv", "app/locale/ru_RU/Luigifab_Versioning.csv"],
["src/app/locale/sk_SK/Luigifab_Versioning.csv", "app/locale/sk_SK/Luigifab_Versioning.csv"],
["src/app/locale/tr_TR/Luigifab_Versioning.csv", "app/locale/tr_TR/Luigifab_Versioning.csv"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created J/07/02/2013
* Updated L/24/05/2021
* Updated D/18/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand Down Expand Up @@ -58,7 +58,7 @@ private function getStoreId() {
return $storeId;
}

private function getLocaleName($code) {
private function getLocaleName(string $code) {

$locales = Mage::getSingleton('core/locale')->getOptionLocales();

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 D/14/02/2021
* Updated J/08/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand Down Expand Up @@ -145,7 +145,7 @@ public function getMaintenanceFlag() {
public function getIpAddr() {

$ip = empty(getenv('HTTP_X_FORWARDED_FOR')) ? false : explode(',', getenv('HTTP_X_FORWARDED_FOR'));
$ip = empty($ip) ? getenv('REMOTE_ADDR') : array_pop($ip);
$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;

return $ip;
Expand Down
8 changes: 4 additions & 4 deletions src/app/code/community/Luigifab/Versioning/Model/Demo.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created V/02/11/2012
* Updated S/16/02/2019
* Updated D/18/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand All @@ -22,7 +22,7 @@ class Luigifab_Versioning_Model_Demo {
// example for EVENT admin_versioning_add_fields
// $observer => ['fields' => $fields]
// fields = (native php object) ArrayObject
public function addFieldsEvent($observer) {
public function addFieldsEvent(Varien_Event_Observer $observer) {

$observer->getData('fields')->append('<label><input type="checkbox" name="test" value="1" /> Simple test</label>');
}
Expand All @@ -32,7 +32,7 @@ public function addFieldsEvent($observer) {
// repository = (object) Luigifab_Versioning_Model_Scm_Xxx
// revision = (string) xyzxyzxyz
// controller = (object) Luigifab_Versioning_Model_Upgrade
public function beforeUpgradeEvent($observer) {
public function beforeUpgradeEvent(Varien_Event_Observer $observer) {

$observer->getData('controller')->writeCommand('before event example');
Mage::log('Luigifab_Versioning_Model_Demo::beforeUpgradeEvent, revision: '.$observer->getData('revision'));
Expand All @@ -48,7 +48,7 @@ public function beforeUpgradeEvent($observer) {
// revision = (string) xyzxyzxyz
// controller = (object) Luigifab_Versioning_Model_Upgrade
// exception = (native php object) Exception
public function afterUpgradeEvent($observer) {
public function afterUpgradeEvent(Varien_Event_Observer $observer) {

if (!empty($observer->getData('exception'))) {
$observer->getData('controller')->writeCommand('after event example');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created M/21/01/2020
* Updated M/06/10/2020
* Updated D/18/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand All @@ -25,7 +25,7 @@ public function isSoftwareInstalled();

public function getSoftwareVersion();

public function getCommitsCollection($local = false);
public function getCommitsCollection(bool $local = false);

public function getCurrentBranch();

Expand Down
4 changes: 2 additions & 2 deletions src/app/code/community/Luigifab/Versioning/Model/Scm/Git.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/03/12/2011
* Updated S/20/03/2021
* Updated D/18/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand All @@ -22,7 +22,7 @@ class Luigifab_Versioning_Model_Scm_Git extends Luigifab_Versioning_Model_Scm {
// génère une collection à partir de l'historique des commits du dépôt
// met en forme les données à partir de la réponse de la commande 'git log'
// utilise GIT_SSH si le fichier de configuration existe
public function getCommitsCollection($local = false) {
public function getCommitsCollection(bool $local = false) {

if (!empty($this->items))
return $this->items;
Expand Down
16 changes: 8 additions & 8 deletions src/app/code/community/Luigifab/Versioning/Model/Upgrade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created V/27/02/2015
* Updated V/18/06/2021
* Updated S/17/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand Down Expand Up @@ -49,7 +49,7 @@ public function disableAllBuffer() {

// exécute le processus de mise à jour
// log les informations de la mise à jour
public function process($targetRevision, $useflag) {
public function process(string $targetRevision, bool $flag) {

$help = Mage::helper('versioning');
$system = $help->getSystem();
Expand Down Expand Up @@ -90,7 +90,7 @@ public function process($targetRevision, $useflag) {
$system->getType(), $H['current_rev'], $targetRevision));

file_put_contents($lock, $H['current_rev'].'/'.$H['target_rev'].' from '.$H['remote_addr'].' by '.$H['user'], LOCK_EX);
if ($useflag)
if ($flag)
copy($lock, $help->getUpgradeFlag());

// ÉTAPE 2 et 3
Expand Down Expand Up @@ -175,23 +175,23 @@ public function process($targetRevision, $useflag) {

// affiche une commande ou une information pour savoir ce qu'il se passe
// ajoute un peu de code HTML pour faire plus jolie
private function writeTitle($data, $endEvent = false) {
private function writeTitle(string $data, bool $endEvent = false) {
echo $endEvent ? '</span>'."\n".$data."\n" : "\n".$data."\n";
}

private function writeEvent($data) {
private function writeEvent(string $data) {
echo '<span class="event">',$data,"\n";
}

public function writeError($data) {
public function writeError(string $data) {
echo '<span class="error">',$data,'</span>',"\n";
}

public function writeNotice($data) {
public function writeNotice(string $data) {
echo '<span class="notice">',$data,'</span>',"\n";
}

public function writeCommand($data) {
public function writeCommand(string $data) {
echo '<code>',$data,'</code>',"\n";
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Created S/03/12/2011
* Updated D/16/05/2021
* Updated J/05/08/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand Down Expand Up @@ -119,8 +119,8 @@ public function delMaintenanceFlagAction() {

public function upgradeAction() {

$revision = $this->getRequest()->getParam('revision', ''); // string
$useflag = ($this->getRequest()->getParam('use_flag', '') == '1'); // boolean
$revision = $this->getRequest()->getParam('revision'); // string
$useflag = ($this->getRequest()->getParam('use_flag') == '1'); // boolean

if (!Mage::getStoreConfigFlag('versioning/scm/enabled')) {
Mage::getSingleton('adminhtml/session')->addError($this->__('Please configure the module before using it.'));
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/07/05/2021
* Updated S/03/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand All @@ -20,7 +20,7 @@
<config>
<modules>
<Luigifab_Versioning>
<version>4.2.1</version>
<version>4.2.2</version>
</Luigifab_Versioning>
</modules>
<global>
Expand Down
4 changes: 1 addition & 3 deletions src/app/code/community/Luigifab/Versioning/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 S/03/12/2011
* Updated J/13/08/2020
* Updated S/03/07/2021
*
* Copyright 2011-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
* https://www.luigifab.fr/openmage/versioning
Expand Down Expand Up @@ -46,7 +46,6 @@
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
<expanded>1</expanded>
<fields>
<enabled translate="label">
<label>Enable</label>
Expand Down Expand Up @@ -110,7 +109,6 @@
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>1</show_in_store>
<expanded>1</expanded>
<fields>
<error503 translate="label">
<label>Error 503 (maintenance.flag)</label>
Expand Down
3 changes: 3 additions & 0 deletions src/app/code/community/Luigifab/Versioning/readme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Files and directories
- app/locale/de_AT/Luigifab_Versioning.csv
- app/locale/de_CH/Luigifab_Versioning.csv
- app/locale/de_DE/Luigifab_Versioning.csv
- app/locale/el_GR/Luigifab_Versioning.csv
- app/locale/en_AU/Luigifab_Versioning.csv
- app/locale/en_CA/Luigifab_Versioning.csv
- app/locale/en_GB/Luigifab_Versioning.csv
Expand All @@ -47,13 +48,15 @@ Files and directories
- app/locale/fr_CA/Luigifab_Versioning.csv
- app/locale/fr_CH/Luigifab_Versioning.csv
- app/locale/fr_FR/Luigifab_Versioning.csv
- app/locale/hu_HU/Luigifab_Versioning.csv
- app/locale/it_CH/Luigifab_Versioning.csv
- app/locale/it_IT/Luigifab_Versioning.csv
- app/locale/ja_JP/Luigifab_Versioning.csv
- app/locale/nl_NL/Luigifab_Versioning.csv
- app/locale/pl_PL/Luigifab_Versioning.csv
- app/locale/pt_BR/Luigifab_Versioning.csv
- app/locale/pt_PT/Luigifab_Versioning.csv
- app/locale/ro_RO/Luigifab_Versioning.csv
- app/locale/ru_RU/Luigifab_Versioning.csv
- app/locale/sk_SK/Luigifab_Versioning.csv
- app/locale/tr_TR/Luigifab_Versioning.csv
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/cs_CZ/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Page title","Název stránky"
"IP address","IP adresa"
"Duration","Trvání"
"Duration","Délka"
"Author","Autor"
2 changes: 1 addition & 1 deletion src/app/locale/de_AT/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"Enable the update page","Update Seite aktivieren"
"Revision","Überarbeitung"
"Graph","Schaubild"
"Author","Verfasser"
"Author","Autor"
"Update to revision %s","Update zur Überarbeitung %s"
"Deliver","Liefern"
"Differences between revisions %s and %s (%s)","Unterschiede zwischen den Überarbeitungen %s und %s (%s)"
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/de_CH/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"Enable the update page","Update Seite aktivieren"
"Revision","Überarbeitung"
"Graph","Schaubild"
"Author","Verfasser"
"Author","Autor"
"Update to revision %s","Update zur Überarbeitung %s"
"Deliver","Liefern"
"Differences between revisions %s and %s (%s)","Unterschiede zwischen den Überarbeitungen %s und %s (%s)"
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/de_DE/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"Enable the update page","Update Seite aktivieren"
"Revision","Überarbeitung"
"Graph","Schaubild"
"Author","Verfasser"
"Author","Autor"
"Update to revision %s","Update zur Überarbeitung %s"
"Deliver","Liefern"
"Differences between revisions %s and %s (%s)","Unterschiede zwischen den Überarbeitungen %s und %s (%s)"
Expand Down
14 changes: 14 additions & 0 deletions src/app/locale/el_GR/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"Page title","Τίτλος Σελίδας"
"INCOMPLETE MODULE INSTALLATION","ΕΛΛΙΠΉΣ ΕΓΚΑΤΆΣΤΑΣΗ ΜΟΝΆΔΑΣ"
"IP address","Διεύθυνση IP"
"Duration","Διάρκεια"
"Author","Συντάκτης"
"new file:-------","νέο αρχείο:------"
"copied:---------","αντιγραφή:-------"
"deleted:--------","διαγραφή:--------"
"modified:-------","τροποποίηση:-----"
"renamed:--------","μετονομασία:-----"
"type changed:---","αλλαγή τύπου:----"
"unmerged:-------","μη συγχωνευμένο:-"
"unknown:--------","άγνωστο:---------"
"pairing broken:-","pairing broken:--"
5 changes: 5 additions & 0 deletions src/app/locale/hu_HU/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"Page title","Oldal címe"
"INCOMPLETE MODULE INSTALLATION","SIKERTELEN MODUL TELEPÍTÉS"
"IP address","IP Cím"
"Duration","Hossz"
"Author","Szerző"
1 change: 1 addition & 0 deletions src/app/locale/ja_JP/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"Page title","ページタイトル"
"IP address","IPアドレス"
"Duration","長さ"
"Author","作成者"
2 changes: 1 addition & 1 deletion src/app/locale/nl_NL/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Page title","Paginatitel"
"IP address","IP-adres"
"Duration","Looptijd"
"Duration","Duur"
"Author","Auteur"
5 changes: 5 additions & 0 deletions src/app/locale/ro_RO/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"Page title","Titlu pagina"
"INCOMPLETE MODULE INSTALLATION","INSTALARE INCOMPLETĂ"
"IP address","Adresa IP"
"Duration","Durată"
"Author","Autor"
1 change: 1 addition & 0 deletions src/app/locale/ru_RU/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"Page title","Заголовок страницы"
"IP address","IP адрес"
"Duration","Длительность"
"Author","Автор"
"new file:-------","новый файл:-----"
"copied:---------","скопировано:----"
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/tr_TR/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"Page title","Sayfa başlığı"
"IP address","IP adresi"
"Duration","Süre"
"Author","Oluşturan"
"Author","Yazar"
"new file:-------","yeni dosya:-----------"
"copied:---------","kopyalandı:-----------"
"deleted:--------","silindi:--------------"
Expand Down
3 changes: 2 additions & 1 deletion src/app/locale/uk_UA/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"Page title","Назва сторінки"
"IP address","IP адреса"
"Duration","Тривалість"
"Duration","Тривалість"
"Author","Автор"
1 change: 1 addition & 0 deletions src/app/locale/zh_CN/Luigifab_Versioning.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"Page title","页面标题"
"IP address","IP地址"
"Duration","时长"
"Author","作者"
"new file:-------","新文件:---------"
"copied:---------","拷贝:-----------"
Expand Down
Loading

0 comments on commit 761a62a

Please sign in to comment.