Comparer les révisions
11 Révisions
Auteur | SHA1 | Date |
---|---|---|
Daniel Seifert | 6e7c2d868e | |
Daniel Seifert | d47993ef64 | |
Daniel Seifert | 37ec1f8b3c | |
Daniel Seifert | ad8ba172e1 | |
Daniel Seifert | c5b5f4c81e | |
Daniel Seifert | 90cab8bd75 | |
Daniel Seifert | ece975eb72 | |
Daniel Seifert | 8d9a348757 | |
Daniel Seifert | f30d2c13a6 | |
Daniel Seifert | ad55da9184 | |
Daniel Seifert | 5b73462214 |
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,5 +1,19 @@
|
|||
# Changelog
|
||||
|
||||
- 4.1.2.0
|
||||
- verwendet Assertions für Bedingungsprüfung
|
||||
- fehlerhaften Methodenaufruf korrigiert
|
||||
|
||||
- 4.1.1.0
|
||||
- Support für OXID 6.5.2
|
||||
- Logging erweitert
|
||||
|
||||
- 4.1.0.0
|
||||
- Support für OXID 6.4 und 6.5
|
||||
- Support für OXID < 6.3 entfernt
|
||||
|
||||
---
|
||||
|
||||
- 4.0.4.2
|
||||
- updated geo ip data (May 2022)
|
||||
|
||||
|
|
27
README.md
27
README.md
|
@ -28,6 +28,33 @@ Führen Sie den folgenden Befehl in Ihrer Shopinstallation aus:
|
|||
composer remove d3/geoip --no-dev
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
Siehe [CHANGELOG](CHANGELOG.md) für weitere Informationen.
|
||||
|
||||
## Beitragen
|
||||
|
||||
Wenn Sie eine Verbesserungsvorschlag haben, legen Sie einen Fork des Repositories an und erstellen Sie einen Pull Request. Alternativ können Sie einfach ein Issue erstellen. Fügen Sie das Projekt zu Ihren Favoriten hinzu. Vielen Dank.
|
||||
|
||||
- Erstellen Sie einen Fork des Projekts
|
||||
- Erstellen Sie einen Feature Branch (git checkout -b feature/AmazingFeature)
|
||||
- Fügen Sie Ihre Änderungen hinzu (git commit -m 'Add some AmazingFeature')
|
||||
- Übertragen Sie den Branch (git push origin feature/AmazingFeature)
|
||||
- Öffnen Sie einen Pull Request
|
||||
|
||||
## Lizenz
|
||||
(Stand: 06.05.2021)
|
||||
|
||||
Vertrieben unter der GPLv3 Lizenz.
|
||||
|
||||
```
|
||||
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||
|
||||
Diese Software wird unter der GNU GENERAL PUBLIC LICENSE Version 3 vertrieben.
|
||||
```
|
||||
|
||||
Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [LICENSE](LICENSE.md)-Datei, die mit diesem Quellcode verteilt wurde.
|
||||
|
||||
## Support
|
||||
|
||||
- D3 Data Development (Inh. Thomas Dartsch)
|
||||
|
|
|
@ -36,8 +36,9 @@
|
|||
}
|
||||
},
|
||||
"require": {
|
||||
"oxid-esales/oxideshop-ce": "6.3 - 6.9",
|
||||
"d3/modcfg": "^5.3.6.000 || ^6"
|
||||
"oxid-esales/oxideshop-ce": "6.8 - 6.14",
|
||||
"d3/modcfg": "^6",
|
||||
"beberlei/assert": "^3.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('102.0.0.0/13', '102.0.0.0', '102.7.255.255', 0x30303030303031373131323736303332, 0x30303030303031373131383030333139, 'KE', 'Kenya', 'AF'),
|
||||
('102.104.0.0/13', '102.104.0.0', '102.111.255.255', 0x30303030303031373138303931373736, 0x30303030303031373138363136303633, 'TN', 'Tunisia', 'AF'),
|
||||
('102.112.0.0/15', '102.112.0.0', '102.113.255.255', 0x30303030303031373138363136303634, 0x30303030303031373138373437313335, 'MU', 'Mauritius', 'AF'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('104.28.123.20/32', '104.28.123.20', '104.28.123.20', 0x30303030303031373436363936393830, 0x30303030303031373436363936393830, 'AQ', 'Antarctica', 'AN'),
|
||||
('104.28.212.152/31', '104.28.212.152', '104.28.212.153', 0x30303030303031373436373139383936, 0x30303030303031373436373139383937, 'AQ', 'Antarctica', 'AN'),
|
||||
('104.28.22.115/32', '104.28.22.115', '104.28.22.115', 0x30303030303031373436363731323139, 0x30303030303031373436363731323139, 'AQ', 'Antarctica', 'AN'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('1.0.1.0/24', '1.0.1.0', '1.0.1.255', 0x30303030303030303136373737343732, 0x30303030303030303136373737373237, 'CN', 'China', 'AS'),
|
||||
('1.0.128.0/17', '1.0.128.0', '1.0.255.255', 0x30303030303030303136383039393834, 0x30303030303030303136383432373531, 'TH', 'Thailand', 'AS'),
|
||||
('1.0.16.0/20', '1.0.16.0', '1.0.31.255', 0x30303030303030303136373831333132, 0x30303030303030303136373835343037, 'JP', 'Japan', 'AS'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('185.203.160.0/22', '185.203.160.0', '185.203.163.255', 0x30303030303033313137313239373238, 0x30303030303033313137313330373531, 'IR', 'Iran', 'AS'),
|
||||
('185.203.168.0/22', '185.203.168.0', '185.203.171.255', 0x30303030303033313137313331373736, 0x30303030303033313137313332373939, 'TR', 'Turkey', 'AS'),
|
||||
('185.203.196.0/22', '185.203.196.0', '185.203.199.255', 0x30303030303033313137313338393434, 0x30303030303033313137313339393637, 'IR', 'Iran', 'AS'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('34.103.254.76/30', '34.103.254.76', '34.103.254.79', 0x30303030303030353737323430363532, 0x30303030303030353737323430363535, 'KW', 'Kuwait', 'AS'),
|
||||
('34.103.254.80/28', '34.103.254.80', '34.103.254.95', 0x30303030303030353737323430363536, 0x30303030303030353737323430363731, 'KW', 'Kuwait', 'AS'),
|
||||
('34.103.254.96/29', '34.103.254.96', '34.103.254.103', 0x30303030303030353737323430363732, 0x30303030303030353737323430363739, 'KW', 'Kuwait', 'AS'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('1.118.32.0/24', '1.118.32.0', '1.118.32.255', 0x30303030303030303234353138363536, 0x30303030303030303234353138393131, 'NL', 'Netherlands', 'EU'),
|
||||
('1.173.94.92/30', '1.173.94.92', '1.173.94.95', 0x30303030303030303238313339313030, 0x30303030303030303238313339313033, 'RU', 'Russia', 'EU'),
|
||||
('1.178.224.0/19', '1.178.224.0', '1.178.255.255', 0x30303030303030303238343939393638, 0x30303030303030303238353038313539, 'ES', 'Spain', 'EU'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('185.41.4.0/22', '185.41.4.0', '185.41.7.255', 0x30303030303033313036343732393630, 0x30303030303033313036343733393833, 'FR', 'France', 'EU'),
|
||||
('185.41.40.0/22', '185.41.40.0', '185.41.43.255', 0x30303030303033313036343832313736, 0x30303030303033313036343833313939, 'RU', 'Russia', 'EU'),
|
||||
('185.41.44.0/25', '185.41.44.0', '185.41.44.127', 0x30303030303033313036343833323030, 0x30303030303033313036343833333237, 'GB', 'United Kingdom', 'EU'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('212.126.160.0/19', '212.126.160.0', '212.126.191.255', 0x30303030303033353635303638323838, 0x30303030303033353635303736343739, 'CH', 'Switzerland', 'EU'),
|
||||
('212.126.192.0/19', '212.126.192.0', '212.126.223.255', 0x30303030303033353635303736343830, 0x30303030303033353635303834363731, 'DE', 'Germany', 'EU'),
|
||||
('212.126.224.0/19', '212.126.224.0', '212.126.255.255', 0x30303030303033353635303834363732, 0x30303030303033353635303932383633, 'IS', 'Iceland', 'EU'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('2a05:4144:8668::/47', '2a05:4144:8668::', '2a05:4144:8669:ffff:ffff:ffff:ffff:ffff', 0x2A054144866800000000000000000000, 0x2A0541448669FFFFFFFFFFFFFFFFFFFF, 'NO', 'Norway', 'EU'),
|
||||
('2a05:4144:8670::/45', '2a05:4144:8670::', '2a05:4144:8677:ffff:ffff:ffff:ffff:ffff', 0x2A054144867000000000000000000000, 0x2A0541448677FFFFFFFFFFFFFFFFFFFF, 'NO', 'Norway', 'EU'),
|
||||
('2a05:4144:8678::/47', '2a05:4144:8678::', '2a05:4144:8679:ffff:ffff:ffff:ffff:ffff', 0x2A054144867800000000000000000000, 0x2A0541448679FFFFFFFFFFFFFFFFFFFF, 'NO', 'Norway', 'EU'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('52.98.202.64/27', '52.98.202.64', '52.98.202.95', 0x30303030303030383738383839353336, 0x30303030303030383738383839353637, 'FR', 'France', 'EU'),
|
||||
('52.98.202.96/28', '52.98.202.96', '52.98.202.111', 0x30303030303030383738383839353638, 0x30303030303030383738383839353833, 'AT', 'Austria', 'EU'),
|
||||
('52.98.203.0/28', '52.98.203.0', '52.98.203.15', 0x30303030303030383738383839373238, 0x30303030303030383738383839373433, 'DE', 'Germany', 'EU'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('100.0.0.0/11', '100.0.0.0', '100.31.255.255', 0x30303030303031363737373231363030, 0x30303030303031363739383138373531, 'US', 'United States', 'NA'),
|
||||
('100.128.0.0/9', '100.128.0.0', '100.255.255.255', 0x30303030303031363836313130323038, 0x30303030303031363934343938383135, 'US', 'United States', 'NA'),
|
||||
('100.32.0.0/13', '100.32.0.0', '100.39.255.255', 0x30303030303031363739383138373532, 0x30303030303031363830333433303339, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('192.153.195.0/24', '192.153.195.0', '192.153.195.255', 0x30303030303033323331333032343030, 0x30303030303033323331333032363535, 'US', 'United States', 'NA'),
|
||||
('192.153.198.0/23', '192.153.198.0', '192.153.199.255', 0x30303030303033323331333033313638, 0x30303030303033323331333033363739, 'US', 'United States', 'NA'),
|
||||
('192.153.20.0/22', '192.153.20.0', '192.153.23.255', 0x30303030303033323331323537363030, 0x30303030303033323331323538363233, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('2405:b500:1480:1111::/64', '2405:b500:1480:1111::', '2405:b500:1480:1111:ffff:ffff:ffff:ffff', 0x2405B500148011110000000000000000, 0x2405B50014801111FFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2405:b500:1480:1112::/63', '2405:b500:1480:1112::', '2405:b500:1480:1113:ffff:ffff:ffff:ffff', 0x2405B500148011120000000000000000, 0x2405B50014801113FFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2405:b500:1480:1114::/62', '2405:b500:1480:1114::', '2405:b500:1480:1117:ffff:ffff:ffff:ffff', 0x2405B500148011140000000000000000, 0x2405B50014801117FFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('2405:b500:5f20:9::/64', '2405:b500:5f20:9::', '2405:b500:5f20:9:ffff:ffff:ffff:ffff', 0x2405B5005F2000090000000000000000, 0x2405B5005F200009FFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2405:b500:5f20:a::/63', '2405:b500:5f20:a::', '2405:b500:5f20:b:ffff:ffff:ffff:ffff', 0x2405B5005F20000A0000000000000000, 0x2405B5005F20000BFFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2405:b500:5f20:c::/62', '2405:b500:5f20:c::', '2405:b500:5f20:f:ffff:ffff:ffff:ffff', 0x2405B5005F20000C0000000000000000, 0x2405B5005F20000FFFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('2606:54c0:2b80:100::/56', '2606:54c0:2b80:100::', '2606:54c0:2b80:1ff:ffff:ffff:ffff:ffff', 0x260654C02B8001000000000000000000, 0x260654C02B8001FFFFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2606:54c0:2b80:10::/60', '2606:54c0:2b80:10::', '2606:54c0:2b80:1f:ffff:ffff:ffff:ffff', 0x260654C02B8000100000000000000000, 0x260654C02B80001FFFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
('2606:54c0:2b80:1::/64', '2606:54c0:2b80:1::', '2606:54c0:2b80:1:ffff:ffff:ffff:ffff', 0x260654C02B8000010000000000000000, 0x260654C02B800001FFFFFFFFFFFFFFFF, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('40.82.0.0/20', '40.82.0.0', '40.82.15.255', 0x30303030303030363736343632353932, 0x30303030303030363736343636363837, 'US', 'United States', 'NA'),
|
||||
('40.82.104.0/21', '40.82.104.0', '40.82.111.255', 0x30303030303030363736343839323136, 0x30303030303030363736343931323633, 'US', 'United States', 'NA'),
|
||||
('40.82.112.0/22', '40.82.112.0', '40.82.115.255', 0x30303030303030363736343931323634, 0x30303030303030363736343932323837, 'US', 'United States', 'NA'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('1.0.0.0/24', '1.0.0.0', '1.0.0.255', 0x30303030303030303136373737323136, 0x30303030303030303136373737343731, 'AU', 'Australia', 'OC'),
|
||||
('1.0.4.0/22', '1.0.4.0', '1.0.7.255', 0x30303030303030303136373738323430, 0x30303030303030303136373739323633, 'AU', 'Australia', 'OC'),
|
||||
('1.1.1.0/24', '1.1.1.0', '1.1.1.255', 0x30303030303030303136383433303038, 0x30303030303030303136383433323633, 'AU', 'Australia', 'OC'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
insert into EE62x.d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
insert into d3geoip (D3IP, D3STARTIP, D3ENDIP, D3STARTIPBIN, D3ENDIPBIN, D3ISO, D3COUNTRYNAME, D3CONTINENTCODE)
|
||||
values ('1.178.32.0/20', '1.178.32.0', '1.178.47.255', 0x30303030303030303238343530383136, 0x30303030303030303238343534393131, 'BR', 'Brazil', 'SA'),
|
||||
('1.178.48.0/20', '1.178.48.0', '1.178.63.255', 0x30303030303030303238343534393132, 0x30303030303030303238343539303037, 'AR', 'Argentina', 'SA'),
|
||||
('101.33.22.0/24', '101.33.22.0', '101.33.22.255', 0x30303030303031363936363637313336, 0x30303030303031363936363637333931, 'BR', 'Brazil', 'SA'),
|
||||
|
|
|
@ -23,7 +23,6 @@ use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
|
|||
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use OxidEsales\Eshop\Application\Component\CurrencyComponent;
|
||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||
use OxidEsales\Eshop\Core\Controller\BaseController;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||
|
@ -61,17 +60,16 @@ class GeoIpComponent extends BaseController
|
|||
/** @var $oLocation d3geoip */
|
||||
$oLocation = oxNew(d3geoip::class);
|
||||
$oLocation->setCountryCurrency();
|
||||
// moved to oxcmp_lang extension because here it's to late
|
||||
// moved to oxcmp_lang extension because here it's too late
|
||||
// $oLocation->setCountryLanguage();
|
||||
|
||||
if (!isset($oBasket)) {
|
||||
$oBasket = $this->getSession()->getBasket();
|
||||
$oBasket = Registry::getSession()->getBasket();
|
||||
}
|
||||
|
||||
// call component again, if curr is registered before we changed it
|
||||
// reason: own component can added after default components only
|
||||
if ($oLocation->hasNotSetCurrency($oBasket->getBasketCurrency())) {
|
||||
/** @var FrontendController $oActView */
|
||||
$oActView = Registry::getConfig()->getActiveView();
|
||||
$aComponents = $oActView->getComponents();
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ class d3_country_geoip extends AdminDetailsController
|
|||
|
||||
/**
|
||||
* @return string
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
|
@ -245,7 +248,7 @@ class d3_country_geoip extends AdminDetailsController
|
|||
if (is_array($aConfLanguages)) {
|
||||
$i = 0;
|
||||
reset($aConfLanguages);
|
||||
while ((list($key, $val) = each($aConfLanguages))) {
|
||||
foreach ($aConfLanguages as $key => $val) {
|
||||
if (is_array($aLangParams)) {
|
||||
//skipping non active languages
|
||||
if (false == $aLangParams[$key]['active']) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This Software is the property of Data Development and is protected
|
||||
* by copyright law - it is NOT Freeware.
|
||||
|
@ -16,6 +17,8 @@
|
|||
|
||||
namespace D3\GeoIp\Application\Model;
|
||||
|
||||
use Assert\Assert;
|
||||
use Assert\InvalidArgumentException;
|
||||
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
|
||||
use D3\ModCfg\Application\Model\d3str;
|
||||
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
|
||||
|
@ -53,7 +56,7 @@ class d3geoip extends BaseModel
|
|||
/**
|
||||
* get oxcountry object by given IP address (optional)
|
||||
*
|
||||
* @param string $sIP optional
|
||||
* @param string|null $sIP optional
|
||||
*
|
||||
* @return Country
|
||||
* @throws d3ShopCompatibilityAdapterException
|
||||
|
@ -63,7 +66,7 @@ class d3geoip extends BaseModel
|
|||
* @throws DatabaseErrorException
|
||||
* @throws StandardException
|
||||
*/
|
||||
public function getUserLocationCountryObject($sIP = null)
|
||||
public function getUserLocationCountryObject(string $sIP = null)
|
||||
{
|
||||
if (!$this->oCountry) {
|
||||
startProfile(__METHOD__);
|
||||
|
@ -123,25 +126,15 @@ class d3geoip extends BaseModel
|
|||
) {
|
||||
$sIP = $this->_getModConfig()->getValue('sTestCountryIp');
|
||||
} else {
|
||||
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
|
||||
$sIP = $_SERVER['HTTP_CF_CONNECTING_IP'];
|
||||
} else if (isset($_SERVER['HTTP_X_REAL_IP'])) {
|
||||
$sIP = $_SERVER['HTTP_X_REAL_IP'];
|
||||
} else if (isset($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$sIP = $_SERVER['HTTP_CLIENT_IP'];
|
||||
} else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$sIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
} else if(isset($_SERVER['HTTP_X_FORWARDED'])) {
|
||||
$sIP = $_SERVER['HTTP_X_FORWARDED'];
|
||||
} else if(isset($_SERVER['HTTP_FORWARDED_FOR'])) {
|
||||
$sIP = $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
} else if(isset($_SERVER['HTTP_FORWARDED'])) {
|
||||
$sIP = $_SERVER['HTTP_FORWARDED'];
|
||||
} else if(isset($_SERVER['REMOTE_ADDR'])) {
|
||||
$sIP = $_SERVER['REMOTE_ADDR'];
|
||||
} else {
|
||||
$sIP = 'UNKNOWN';
|
||||
}
|
||||
$sIP = $_SERVER['HTTP_CF_CONNECTING_IP']
|
||||
?? $_SERVER['HTTP_X_REAL_IP']
|
||||
?? $_SERVER['HTTP_CLIENT_IP']
|
||||
?? $_SERVER['HTTP_X_FORWARDED_FOR']
|
||||
?? $_SERVER['HTTP_X_FORWARDED']
|
||||
?? $_SERVER['HTTP_FORWARDED_FOR']
|
||||
?? $_SERVER['HTTP_FORWARDED']
|
||||
?? $_SERVER['REMOTE_ADDR']
|
||||
?? 'UNKNOWN';
|
||||
}
|
||||
$sIP = str_replace(' ', '', $sIP);
|
||||
|
||||
|
@ -153,12 +146,12 @@ class d3geoip extends BaseModel
|
|||
/**
|
||||
* get ISO alpha 2 ID by IP address
|
||||
*
|
||||
* @param int $sIP IP address
|
||||
* @param string $sIP IP address
|
||||
*
|
||||
* @return string
|
||||
* @throws DatabaseConnectionException
|
||||
*/
|
||||
public function loadByIP($sIP)
|
||||
public function loadByIP(string $sIP)
|
||||
{
|
||||
startProfile(__METHOD__);
|
||||
|
||||
|
@ -196,7 +189,7 @@ class d3geoip extends BaseModel
|
|||
* @return Country
|
||||
* @throws DatabaseConnectionException
|
||||
*/
|
||||
public function getCountryObject($sISOAlpha)
|
||||
public function getCountryObject(string $sISOAlpha)
|
||||
{
|
||||
startProfile(__METHOD__);
|
||||
|
||||
|
@ -252,34 +245,38 @@ class d3geoip extends BaseModel
|
|||
{
|
||||
startProfile(__METHOD__);
|
||||
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'start shop or url switch');
|
||||
$this->performURLSwitch();
|
||||
$this->performShopSwitch();
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'end shop or url switch');
|
||||
|
||||
if (!$this->_getModConfig()->isActive()
|
||||
|| false == $this->_getModConfig()->getValue('blChangeLang')) {
|
||||
|| false == $this->_getModConfig()->getValue('blChangeLang')
|
||||
) {
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'language change option or module is disabled');
|
||||
stopProfile(__METHOD__);
|
||||
return;
|
||||
}
|
||||
|
||||
$oCountry = $this->getUserLocationCountryObject();
|
||||
|
||||
if (!$this->isAdmin()
|
||||
&& Registry::getUtils()->isSearchEngine() === false
|
||||
&& Registry::getSession()->getId()
|
||||
&& Registry::getSession()->getVariable('d3isSetLang') === null
|
||||
&& $oCountry->getId() && $oCountry->getFieldData('d3geoiplang') > -1
|
||||
) {
|
||||
$this->_getLog()->log(
|
||||
d3log::INFO,
|
||||
try {
|
||||
$this->canChangeLanguage( $oCountry );
|
||||
|
||||
$language = (int) $oCountry->getFieldData('d3geoiplang');
|
||||
$this->_getModConfig()->d3getLog()->info(
|
||||
__CLASS__,
|
||||
__FUNCTION__,
|
||||
__LINE__,
|
||||
'set language',
|
||||
$this->getIP().' => '.$oCountry->getFieldData('d3geoiplang')
|
||||
$this->getIP().' => '.$language
|
||||
);
|
||||
Registry::getLang()->setTplLanguage((int) $oCountry->getFieldData('d3geoiplang'));
|
||||
Registry::getLang()->setBaseLanguage((int) $oCountry->getFieldData('d3geoiplang'));
|
||||
Registry::getLang()->setTplLanguage($language);
|
||||
Registry::getLang()->setBaseLanguage($language);
|
||||
Registry::getSession()->setVariable('d3isSetLang', true);
|
||||
Registry::getLogger()->debug('language set', [$language]);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Registry::getLogger()->debug($e->getMessage(), [$oCountry]);
|
||||
}
|
||||
|
||||
stopProfile(__METHOD__);
|
||||
|
@ -307,12 +304,9 @@ class d3geoip extends BaseModel
|
|||
|
||||
$oCountry = $this->getUserLocationCountryObject();
|
||||
|
||||
if (!$this->isAdmin()
|
||||
&& Registry::getUtils()->isSearchEngine() === false
|
||||
&& !Registry::getSession()->getVariable('d3isSetCurr')
|
||||
&& $oCountry->getId()
|
||||
&& $oCountry->getFieldData('d3geoipcur') > -1
|
||||
) {
|
||||
try {
|
||||
$this->canChangeCurrency( $oCountry );
|
||||
|
||||
$this->_getLog()->log(
|
||||
d3log::INFO,
|
||||
__CLASS__,
|
||||
|
@ -323,6 +317,8 @@ class d3geoip extends BaseModel
|
|||
);
|
||||
Registry::getConfig()->setActShopCurrency((int) $oCountry->getFieldData('d3geoipcur'));
|
||||
Registry::getSession()->setVariable('d3isSetCurr', true);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Registry::getLogger()->debug($e->getMessage(), [$oCountry]);
|
||||
}
|
||||
|
||||
stopProfile(__METHOD__);
|
||||
|
@ -364,6 +360,7 @@ class d3geoip extends BaseModel
|
|||
public function performShopSwitch()
|
||||
{
|
||||
if (!$this->_getModConfig()->isActive() || !$this->_getModConfig()->getValue('blChangeShop')) {
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'shop change option or module is disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -372,22 +369,17 @@ class d3geoip extends BaseModel
|
|||
$oCountry = $this->getUserLocationCountryObject();
|
||||
$iNewShop = $oCountry->getFieldData('d3geoipshop');
|
||||
|
||||
if (Registry::getRequest()->getRequestEscapedParameter('d3redirect') != 1
|
||||
&& false == $this->isAdmin()
|
||||
&& Registry::getUtils()->isSearchEngine() === false
|
||||
&& $oCountry->getId()
|
||||
&& $this->getConfig()->isMall()
|
||||
&& $iNewShop > -1 &&
|
||||
(
|
||||
$iNewShop != $this->getConfig()->getShopId()
|
||||
|| strtolower($this->getConfig()->getActiveView()->getClassKey()) == 'mallstart'
|
||||
)
|
||||
) {
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'check allowed shop change');
|
||||
|
||||
try {
|
||||
$this->canChangeShop( $oCountry, $iNewShop );
|
||||
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'prepare shop change to '.$iNewShop);
|
||||
$oNewConf = new Config();
|
||||
$oNewConf->setShopId($iNewShop);
|
||||
$oNewConf->init();
|
||||
|
||||
$this->getConfig()->onShopChange();
|
||||
Registry::getConfig()->onShopChange();
|
||||
|
||||
if (!Registry::getSession()->getVariable('d3isSetLang')
|
||||
&& $this->_getModConfig()->getValue('blChangeLang')
|
||||
|
@ -420,8 +412,12 @@ class d3geoip extends BaseModel
|
|||
$this->getIP().' => '.$sUrl
|
||||
);
|
||||
|
||||
$this->_getModConfig()->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'change to shop url', $sUrl);
|
||||
|
||||
header("Location: ".$sUrl);
|
||||
exit();
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Registry::getLogger()->debug($e->getMessage(), [$oCountry]);
|
||||
}
|
||||
|
||||
stopProfile(__METHOD__);
|
||||
|
@ -452,13 +448,9 @@ class d3geoip extends BaseModel
|
|||
|
||||
$oCountry = $this->getUserLocationCountryObject();
|
||||
|
||||
if ($this->dontSkipUrlRedirect()
|
||||
&& false == $this->isAdmin()
|
||||
&& Registry::getUtils()->isSearchEngine() === false
|
||||
&& $oCountry->getId()
|
||||
&& $oCountry->getFieldData('d3geoipurl')
|
||||
&& strlen(trim($oCountry->getFieldData('d3geoipurl'))) > 0
|
||||
) {
|
||||
try {
|
||||
$this->canRedirect( $oCountry );
|
||||
|
||||
$sNewUrl = $oCountry->getFieldData('d3geoipurl');
|
||||
|
||||
$this->_getLog()->log(
|
||||
|
@ -472,6 +464,8 @@ class d3geoip extends BaseModel
|
|||
|
||||
header("Location: ".$sNewUrl);
|
||||
exit();
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Registry::getLogger()->debug($e->getMessage(), [$oCountry]);
|
||||
}
|
||||
|
||||
stopProfile(__METHOD__);
|
||||
|
@ -502,7 +496,7 @@ class d3geoip extends BaseModel
|
|||
$aShopUrls = array();
|
||||
|
||||
foreach ($oShoplist->arrayKeys() as $sId) {
|
||||
$aShopUrls[$sId] = $this->getConfig()->getShopConfVar('sMallShopURL', $sId);
|
||||
$aShopUrls[$sId] = Registry::getConfig()->getShopConfVar('sMallShopURL', $sId);
|
||||
}
|
||||
|
||||
stopProfile(__METHOD__);
|
||||
|
@ -539,5 +533,77 @@ class d3geoip extends BaseModel
|
|||
|
||||
return $this->oD3Log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Country $oCountry
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function canRedirect( Country $oCountry )
|
||||
{
|
||||
Assert::that($this->dontSkipUrlRedirect())->true('redirect skip is not provided');
|
||||
$this->isUserInFrontend();
|
||||
Assert::that($oCountry->getId())->notBlank('no country loaded');
|
||||
Assert::that($oCountry->getFieldData( 'd3geoipurl' ))->notBlank('no redirect url set');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Country $oCountry
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
/**
|
||||
* @param Country $oCountry
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function canChangeLanguage( Country $oCountry )
|
||||
{
|
||||
$this->isUserInFrontend();
|
||||
Assert::that(Registry::getSession()->getVariable( 'd3isSetLang' ))->null('language already set');
|
||||
Assert::that($oCountry->getId())->notBlank('no country loaded');
|
||||
Assert::that($oCountry->getFieldData( 'd3geoiplang' ))->greaterThan(-1, 'no target language set');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Country $oCountry
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function canChangeCurrency( Country $oCountry )
|
||||
{
|
||||
$this->isUserInFrontend();
|
||||
Assert::that(Registry::getSession()->getVariable( 'd3isSetCurr' ))->null('currency already set');
|
||||
Assert::that($oCountry->getId())->notBlank('no country loaded');
|
||||
Assert::that($oCountry->getFieldData( 'd3geoipcur' ))->greaterThan(-1, 'no target currency set');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Country $oCountry
|
||||
* @param $iNewShop
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function canChangeShop( Country $oCountry, $iNewShop )
|
||||
{
|
||||
Assert::that(Registry::getRequest()->getRequestEscapedParameter( 'd3redirect' ))->notSame('1', 'redirect already performed');
|
||||
$this->isUserInFrontend();
|
||||
Assert::that($oCountry->getId())->notBlank('no country loaded');
|
||||
Assert::that(Registry::getConfig()->isMall())->true('no mall installation');
|
||||
Assert::that($iNewShop)->greaterThan(-1, 'no target shop id set');
|
||||
Assert::that(
|
||||
$iNewShop != Registry::getConfig()->getShopId() ||
|
||||
strtolower( Registry::getConfig()->getActiveView()->getClassKey() ) == 'mallstart'
|
||||
)->true('no different shop and no mallstart');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function isUserInFrontend()
|
||||
{
|
||||
Assert::that($this->isAdmin())->false('User is in admin');
|
||||
Assert::that(Registry::getUtils()->isSearchEngine())->false('User is search engine');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ $aLang = [
|
|||
|
||||
'D3_GEOIP_UPDATE_ITEMINSTALL' => 'Die umfangreiche IP-Liste kann leider nicht über die '.
|
||||
'automatische Installation eingebunden werden. Bitte installieren Sie diese manuell. '.PHP_EOL.PHP_EOL.
|
||||
'Laden Sie bitte die aktuellen CSV-Daten des Anbieters Maxmind. In "setup+doku/importCSVtoMySQL" des Modulpaketes finden Sie weitere Informationen und die erforderlichen Datenbank-Befehle, um die nötigen Daten zu generieren.'.PHP_EOL.PHP_EOL.
|
||||
'Alternativ finden Sie die erforderlichen Daten im Installationspaket des Moduls unter "setup+doku/geoip-data_*". '.PHP_EOL.PHP_EOL.
|
||||
'Laden Sie bitte die aktuellen CSV-Daten des Anbieters Maxmind. In "docs/importCSVtoMySQL" des Modulpaketes finden Sie weitere Informationen und die erforderlichen Datenbank-Befehle, um die nötigen Daten zu generieren.'.PHP_EOL.PHP_EOL.
|
||||
'Alternativ finden Sie die erforderlichen Daten im Installationspaket des Moduls unter "docs/geoip-data_*". '.PHP_EOL.PHP_EOL.
|
||||
'Führen Sie die SQL-Datei(en) bitte in Ihrer Datenbank aus.',
|
||||
];
|
||||
|
|
|
@ -30,7 +30,7 @@ function EditThis( sID)
|
|||
function _groupExp(el) {
|
||||
var _cur = el.parentNode;
|
||||
|
||||
if (_cur.className == "exp") _cur.className = "";
|
||||
if (_cur.className === "exp") _cur.className = "";
|
||||
else _cur.className = "exp";
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ function showFormatSettings(sElemId, visible, blUseOldElem)
|
|||
sOldSettingElem = sElemId;
|
||||
}
|
||||
|
||||
if (visible == true) {
|
||||
if (visible === true) {
|
||||
document.getElementById(sElemId).style.display = 'block';
|
||||
} else {
|
||||
document.getElementById(sElemId).style.display = 'none';
|
||||
|
@ -57,7 +57,7 @@ function showFormatSettings(sElemId, visible, blUseOldElem)
|
|||
-->
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
<style>
|
||||
<!--
|
||||
fieldset{
|
||||
border: 1px inset black;
|
||||
|
@ -104,9 +104,9 @@ td.edittext {
|
|||
<input type="hidden" name="oxid" value="[{$oxid}]">
|
||||
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
|
||||
|
||||
<table border="0" width="98%">
|
||||
<table style="border: 0; width: 98%">
|
||||
<tr>
|
||||
<td valign="top" class="edittext">
|
||||
<td style="vertical-align: top" class="edittext">
|
||||
|
||||
[{include file="d3_cfg_mod_active.tpl"}]
|
||||
|
||||
|
@ -224,9 +224,9 @@ td.edittext {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<table width="100%">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td class="edittext ext_edittext" align="left">
|
||||
<td class="edittext ext_edittext" style="text-align: left">
|
||||
<span class="d3modcfg_btn icon status_ok">
|
||||
<input type="submit" name="save" value="[{oxmultilang ident="D3_GENERAL_GEOIP_SAVE"}]">
|
||||
<span></span>
|
||||
|
|
|
@ -43,7 +43,9 @@ class d3_oxcmp_lang_geoip extends d3_oxcmp_lang_geoip_parent
|
|||
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
|
||||
/** @var $oLocation d3geoip */
|
||||
$oLocation = oxNew(d3geoip::class);
|
||||
d3_cfg_mod::get($this->_sModId)->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'start perform language switch');
|
||||
$oLocation->setCountryLanguage();
|
||||
d3_cfg_mod::get($this->_sModId)->d3getLog()->info(__CLASS__, __FUNCTION__, __LINE__, 'end perform language switch');
|
||||
}
|
||||
|
||||
parent::init();
|
||||
|
|
|
@ -22,16 +22,16 @@ use OxidEsales\Eshop\Core\Registry;
|
|||
class d3_oxshopcontrol_geoip extends d3_oxshopcontrol_geoip_parent
|
||||
{
|
||||
/**
|
||||
* @param null $sClass
|
||||
* @param null $sFunction
|
||||
* @param null $aParams
|
||||
* @param null $aViewsChain
|
||||
* @param null $controllerKey
|
||||
* @param null $function
|
||||
* @param null $parameters
|
||||
* @param null $viewsChain
|
||||
*/
|
||||
public function start ($sClass = null, $sFunction = null, $aParams = null, $aViewsChain = null)
|
||||
public function start ($controllerKey = null, $function = null, $parameters = null, $viewsChain = null)
|
||||
{
|
||||
$this->_d3AddGeoIpComponent();
|
||||
|
||||
parent::start($sClass, $sFunction, $aParams, $aViewsChain);
|
||||
parent::start( $controllerKey, $function, $parameters, $viewsChain);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,30 +16,37 @@
|
|||
|
||||
namespace D3\GeoIp\Setup;
|
||||
|
||||
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
|
||||
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
|
||||
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
|
||||
use D3\ModCfg\Application\Model\Install\d3install_updatebase;
|
||||
use D3\ModCfg\Application\Model\Installwizzard\d3installdbfield;
|
||||
use D3\ModCfg\Application\Model\Installwizzard\d3installdbtable;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use Exception;
|
||||
use OxidEsales\Eshop\Application\Model\Shop;
|
||||
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||
use OxidEsales\Eshop\Core\Exception\ConnectionException;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException as DatabaseErrorException;
|
||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
use OxidEsales\Facts\Facts;
|
||||
use ReflectionException;
|
||||
|
||||
class d3geoip_update extends d3install_updatebase
|
||||
{
|
||||
public $sModKey = 'd3_geoip';
|
||||
public $sModName = 'GeoIP';
|
||||
public $sModVersion = '4.0.4.2';
|
||||
public $sModRevision = '4042';
|
||||
public $sModVersion = '4.1.2.0';
|
||||
public $sModRevision = '4120';
|
||||
public $sBaseConf = '--------------------------------------------------------------------------------
|
||||
nW2v2==OUkzREVCV0VUMjdObzArYU1aZVRINnhkRWlPM2I0aE5TYU1yVXl3R3g1RFNIdkk0dmlxRWVjQ
|
||||
zMxbzJqV0xwQ2lHY290K3UxK3A0bW5zZ2IzL2cyMmt6ckQxNjN1V0Q1eXl6K3dBcEpURUQ0WEsvYmd6T
|
||||
lo4aW9QV3ZHcjF3MnZhMklUY1pabmNQWEk4QTNRQ2FNMDl5b202WTl6b2QwaktNQUpqWG84MEpBSWNVM
|
||||
1dMaXZ3bTIrL1dTTW5rWHJUdXp4blZ2Y1BXRzd6Z01QVW4ybTN3MmFlQ1YyVnRZUjF5OGZKdEZheFVLT
|
||||
VJqSU9aQ1FrMDhZcHZsa2Z0ekY5RzVDL0V0TUxSUEtoL29SVGppbWlqRHY5V0tlczNkMmIzVEcraDBiT
|
||||
XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
||||
4I6v2==YXpDb3ovcGlNbStFUXg1UXBUR0h6aXRiS2hZMHorN3d3Q2ZjTmVWcE8yNy9COFRidHFqL0VhW
|
||||
WZVS2hvY2JlQ29EcTRoaEJJQjJoVXc5M1B3TmFseXEyUHQrUHEveUtGUFdhVW5wWFc3d2xTNGcyeDE3a
|
||||
DBHbFBicHR1TWxWMkxZQURFMFNnV05ubllTcGRWdkw1SlJNNmk0OVBBT3Y5N0dRb1drWXJSUStsc1Q5Z
|
||||
Gh0L09EMnhVYW9FUGNGSG5jcktXSXpVeE10Tm9IT2VmQW1VSFZQWmxaMG0ycHNKeks1cUNCWnI4c1Q3M
|
||||
1F2U3RMY1FsWHRRTGRRL2kzN1pTaWpKWXBlaXBFYVFTN3lOWnpnZVl5blVhWkxNMnBqT1JQT3M2cnJYT
|
||||
S9kMERSZUFscmR6VW9iZlZVZjhoYzNUdWo=
|
||||
--------------------------------------------------------------------------------';
|
||||
public $sRequirements = '';
|
||||
public $sBaseValue = '';
|
||||
|
@ -238,6 +245,9 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
*/
|
||||
public function checkGeoIpTableExist()
|
||||
{
|
||||
|
@ -246,12 +256,16 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws ConnectionException
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
*/
|
||||
public function updateGeoIpTableExist()
|
||||
{
|
||||
$blRet = false;
|
||||
if ($this->checkGeoIpTableExist()) {
|
||||
$blRet = $this->_addTable2('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP', 'InnoDB');
|
||||
$blRet = $this->_addTable2('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP');
|
||||
}
|
||||
|
||||
return $blRet;
|
||||
|
@ -315,12 +329,13 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
{
|
||||
/** @var d3installdbtable $oDbTable */
|
||||
$oDbTable = oxNew(d3installdbtable::class, $this);
|
||||
$blRet = $oDbTable->changeTableEngine('d3geoip', 'InnoDB');
|
||||
return $blRet;
|
||||
return $oDbTable->changeTableEngine('d3geoip', 'InnoDB');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
*/
|
||||
public function checkGeoIpItems()
|
||||
{
|
||||
|
@ -328,9 +343,7 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
'D3ISO' => 'DE',
|
||||
);
|
||||
|
||||
$blRet = $this->_checkTableItemNotExist('d3geoip', $aWhere);
|
||||
|
||||
return $blRet;
|
||||
return $this->_checkTableItemNotExist('d3geoip', $aWhere);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -369,6 +382,11 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws ConnectionException
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function updateModCfgItemExist()
|
||||
{
|
||||
|
@ -453,7 +471,7 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
),
|
||||
array (
|
||||
'fieldname' => 'OXSHOPVERSION',
|
||||
'content' => Registry::getConfig()->getEdition(),
|
||||
'content' => oxNew(Facts::class)->getEdition(),
|
||||
'force_update' => true,
|
||||
'use_quote' => true,
|
||||
'use_multilang' => false,
|
||||
|
@ -493,7 +511,12 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* change default value for shop id in EE
|
||||
*
|
||||
* @return bool
|
||||
* @throws ConnectionException
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
*/
|
||||
public function checkGeoIpFields()
|
||||
{
|
||||
|
@ -506,7 +529,12 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* change default value for shop id in EE
|
||||
*
|
||||
* @return bool
|
||||
* @throws ConnectionException
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
*/
|
||||
public function fixGeoIpFields()
|
||||
{
|
||||
|
@ -519,6 +547,14 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
* @throws d3ParameterNotFoundException
|
||||
* @throws d3ShopCompatibilityAdapterException
|
||||
* @throws d3_cfg_mod_exception
|
||||
* @throws StandardException
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function hasUnregisteredFiles()
|
||||
{
|
||||
|
@ -527,6 +563,13 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
* @throws ReflectionException
|
||||
* @throws StandardException
|
||||
* @throws d3ShopCompatibilityAdapterException
|
||||
* @throws d3_cfg_mod_exception
|
||||
*/
|
||||
public function showUnregisteredFiles()
|
||||
{
|
||||
|
@ -602,10 +645,8 @@ XJ5U0QrUFZyUHFnNnNBdnZOa3ZRVUZVOWk=
|
|||
" AND oxmodule = ".$oDb->quote($sModuleId);
|
||||
|
||||
$aResult = $oDb->getAll($sSelect);
|
||||
$aUserComponents = is_array($aResult) && count($aResult)
|
||||
return is_array($aResult) && count($aResult)
|
||||
? Registry::getConfig()->decodeValue($aResult[0]['type'], $aResult[0]['value'])
|
||||
: null;
|
||||
|
||||
return $aUserComponents;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,10 +30,10 @@ $aModule = [
|
|||
'en' => '',
|
||||
],
|
||||
'thumbnail' => 'picture.png',
|
||||
'version' => '4.0.4.2',
|
||||
'version' => '4.1.2.0',
|
||||
'author' => 'D³ Data Development (Inh.: Thomas Dartsch)',
|
||||
'email' => 'support@shopmodule.com',
|
||||
'url' => 'http://www.oxidmodule.com/',
|
||||
'url' => 'https://www.oxidmodule.com/',
|
||||
'extend' => [
|
||||
LanguageComponent::class => d3_oxcmp_lang_geoip::class,
|
||||
ShopControl::class => d3_oxshopcontrol_geoip::class
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket