GeoIP Detection - Version 2.9.1

Version Description

Online Shops: Be careful to comply to (EU) 2018/302 (going into effect 03 Dec 2018) in how you use this plugin !

Download this release

Release Info

Developer benjaminpick
Plugin Icon 128x128 GeoIP Detection
Version 2.9.1
Comparing to
See all releases

Code changes from version 2.9.0 to 2.9.1

CHANGELOG.md CHANGED
@@ -1,22 +1,16 @@
1
- ## Old Changelog ##
2
 
3
- # 2.9.0 =
4
- * NEW: Wizard to get the right ip adress (in order to simplify reverse proxy configuration).
5
- * The reverse proxy logic was heavily changed. If you run into configuration errors, try the wizard.
6
- * NEW: The CSS classes that are added to the body-tag (if enabled in the options) now also include the most specific subdivisino (province).
7
- * Maxmind vendor code was updated to the current version (2.8.0).
8
-
9
- # 2.8.2 =
10
  * Maxmind vendor code was updated to the current version (2.7.0).
11
  * FIX: There was a fatal error when using PHP 7.2 (thx jj-dev)
12
  * FIX: The automatic update of Maxmind Geoip2 Lite City database was fixed.
13
  * FIX: Always try to fill in more information into the country information from the GeoNames-DB.
14
 
15
- # 2.8.1 =
16
 
17
  (Was not released on wordpress.org)
18
 
19
- # 2.8.0 =
20
 
21
  * FIX: Localhost now always is a trusted proxy (for standard reverse proxy configurations, however the checkbox "uses a reverse proxy" still needs to be activated.)
22
  * FIX: Timezone was overwritten by country data even though the maxmind data had already detected a timezone.
@@ -24,7 +18,7 @@
24
  * Maxmind vendor code was updated to the current version (2.6.0).
25
  * PHP 5.4 is now required (due to the maxmind library).
26
 
27
- # 2.7.0 =
28
 
29
  * ADD: The options array of `geoip_detect2_get_info_from_ip` now has a new parameter for overriding the current source for a single lookup. See [API usage examples](https://github.com/yellowtree/wp-geoip-detect/wiki/API-Usage-Examples)
30
  * ADD: New filter `geoip_detect2_shortcode_country_select_countries` for the country list of `[geoip_detect2_countries]`
@@ -32,7 +26,7 @@
32
  * FIX: Compatibility with CF 4.6 (remove deprecated function call)
33
  * Maxmind vendor code was updated to the current version (2.4.5).
34
 
35
- # 2.6.0 =
36
 
37
  * ADD: New datasources for Cloudflare & Amazon AWS CloudFront (countries for current IP only).
38
  * ADD: Country information (names, lat/lon, continent, localized in the different languages) are now filled in for sources that only detect the country code (Cloudflare, Amazon, hostip.info)
@@ -42,40 +36,40 @@
42
  * FIX: Shortcode didn't use current sitelang as default, but always english
43
  * Maxmind vendor code was updated to the current version (2.4.2).
44
 
45
- # 2.5.7 =
46
  * ADD: Shortcodes can now optionally specifiy the IP: `[geoip_detect2 property="country.isoCode" ip="(ipv4 or ipv6)"]`
47
  * ADD: Plugin is now translated into German.
48
  * FIX: `geoip_detect2_get_info_from_current_ip()` now also handles the case when REMOTE_ADDR contains multiple IP adresses
49
 
50
- # 2.5.6 =
51
  * FIX: Removed noticed concerning open_basedir.
52
 
53
- # 2.5.5 =
54
 
55
  * Clean-up changes to prepare plugin translation.
56
  * FIX: Only show the "no database installed" admin notice to admins (props @meitar)
57
 
58
- # 2.5.4 =
59
 
60
  * FIX: Manual datasource filepath handling corrected.
61
  * FIX: Potential incompability with BuddyPress removed.
62
 
63
- # 2.5.3 =
64
 
65
  * FIX: (Security) Add nonces to backend to avoid CSRF (thanks to Gerard Arall).
66
  * FIX: Do not use PHP shortcode tags (<?=) as some servers do not support it with PHP 5.3
67
  * Maxmind vendor code was updated to the current version (2.3.3).
68
 
69
- # 2.5.2 =
70
  * FIX: Also disallow proxy caching via HTTP header, if possible.
71
  * NEW: Shortcodes for the other API functions: `[geoip_detect2_get_current_source_description]`, `[geoip_detect2_get_client_ip]`, and `[geoip_detect2_get_external_ip_adress]`
72
  * FIX: geoip_detect2_get_external_ip_adress() : do not filter if $unfiltered is true.
73
 
74
- # 2.5.1 =
75
  * FIX: Upgrade script did change the source.
76
  * FIX: Page caching is only disabled on upgrade when `set_css_country` is disabled.
77
 
78
- # 2.5.0 =
79
  * CHANGE: The parameter $skipCache is now $options['skipCache']. Using $skipCache is deprecated, but still works.
80
  * NEW: $options['timeout'] for Web-API lookups can now be specified.
81
  * FIX: Hostip.info did not set traits->ipAddress
@@ -83,22 +77,22 @@
83
  * NEW: Disable page caching if geoip-API was called (this is configurable in the options). (Supported plugins: WP Super Cache, W3 Total Cache, ZenCache, and possibly others)
84
  * Maxmind vendor code was updated to the current version (2.3.1).
85
 
86
- # 2.4.3 =
87
  * FIX: Options Page: The checkboxes didn't show (even though the option was saved) since 2.4.0
88
  * NEW: A fixed external IP can now be specified on the options page. (Useful in development scenarios without internet, or mixed internet/intranet cases. You can also use this to speed up things on the production server if you know the IP will not change.)
89
  * NEW: Hidden feature/side-effect: Clicking on save in the General Options section also empties the external IP cache.
90
 
91
- # 2.4.2 =
92
  * FIX: Trim whitespace of IP adress.
93
  * FIX: some PHP notices.
94
  * FIX: The Installation message "No database installed" failed to install the Maxmind database since 2.4.0
95
  * NEW: Show IPv6-not-supported notice.
96
  * FIX: Add empty fallback functions in case the plugin requirements are not met. (To avoid fatal errors.)
97
 
98
- # 2.4.1 =
99
  * FIX: Revert IPv6 check. (Sorry for this. I thought PHP compiled without IPv6 would be esoteric.)
100
 
101
- # 2.4.0 =
102
  This is a major refactor in order to support multiple sources properly. The Lookup and the Options were seperated into 2 screens (accessible in the menu under `Tools` and `Options`, respectively.)
103
 
104
  * NEW: Add a Cache for Web-API-Requests. Consequently, the function geoip_detect2_get_info_from_ip() received a new parameter "$skipCache" to skip this cache if not needed. You can check if the result is coming from the cache by checking $result->extra->cached (it is 0 when not cached, UNIX timestamp of cache event otherwise).
@@ -109,31 +103,31 @@ This is a major refactor in order to support multiple sources properly. The Look
109
  * FIX: Check for IPv6 support for PHP.
110
  * FIX: Country data now also get timezones.
111
 
112
- # 2.3.1 =
113
  * NEW: API function geoip_detect2_get_current_source_description() (as there are different sources to choose from now)
114
  * FIX: Show error message if PHP < 5.3 (instead of fatal error)
115
 
116
- # 2.3.0 =
117
  * NEW: Add HostIP.info-Support
118
 
119
- # 2.2.0 =
120
  * FIX: Update Maxmind Reader to 1.0.3 (fixing issues when the PHP extension mbstring was not installed)
121
  * NEW: Commercial databases are now supported. You can specify a file path in the options.
122
  * NEW: A country database (lite or commercial) database now works as well.
123
  * NEW:
124
  License is now displayed before install.
125
 
126
- # 2.1.2 =
127
  * FIX: Show error message if PHP < 5.3 (instead of fatal error)
128
  * FIX: Support multiple proxies (but currently only one reverse proxy)
129
 
130
- # 2.1.1 =
131
  * FIX: Notice "Database missing" should not show during/right after database update.
132
 
133
- # 2.1.0 =
134
  * NEW: A nagging admin notice shows up on every wp-admin page when no database is installed (yet).
135
 
136
- # 2.0.1 =
137
  * NEW: Using v2 version of the API.
138
  See Migration Guide at [Github](https://github.com/yellowtree/wp-geoip-detect/wiki/How-to-migrate-from-v1-to-v2)
139
 
@@ -144,41 +138,41 @@ Other changes:
144
  * NEW: IPv6 addresses are now supported as well.
145
  * Legacy function names and shortcode should work in most cases. For details check the guide above.
146
 
147
- # 2.0.0 =
148
 
149
  (Was not released on wordpress.org to make sure that development releases get this update as well.)
150
 
151
- # 1.8 =
152
  * NEW: Support reverse proxies (you have to enable it in the plugin options.)
153
  * NEW: Shortcode now has a default value when no information for this IP found.
154
 
155
- # 1.7.1 =
156
  * FIX: Fatal error on cron run
157
 
158
- # 1.7 =
159
  * FIX: Schedule Database update to do in background immediately after plugin installation/re-activation.
160
  * FIX: Longitude can be smaller than -90
161
 
162
- # 1.6 =
163
  * NEW: Can add a country- and continent-specific class on the body tag. You need to activate this in the options.
164
  * FIX: Automatic weekly update. (Didn't work on all installations).
165
  * FIX: Do not include Maxmind Libraries again if already included by another plugin/theme
166
 
167
- # 1.5 =
168
  * FIX: Automatic weekly update. Go to the plugin page (Tools menu) to verify that an update is planned.
169
 
170
- # 1.4 =
171
  * Feature: Add shortcode [geoip_detect property="(property name)"] for direct use in posts/pages
172
 
173
- # 1.3 =
174
  * FIX: Manual install works again (was broken since 1.2)
175
 
176
- # 1.2 =
177
  * FIX: property region_name is now filled again (was broken since 1.1)
178
 
179
- # 1.1 =
180
  * Add function `geoip_detect_get_external_ip_adress()`: Ask a webservice to tell me the external IP of the webserver.
181
  * New filter: When developing locally, the external IP is used to determine the geographic location.
182
 
183
- # 1.0 =
184
  * First working release.
1
+ == Old Changelog ==
2
 
3
+ = 2.8.2 =
 
 
 
 
 
 
4
  * Maxmind vendor code was updated to the current version (2.7.0).
5
  * FIX: There was a fatal error when using PHP 7.2 (thx jj-dev)
6
  * FIX: The automatic update of Maxmind Geoip2 Lite City database was fixed.
7
  * FIX: Always try to fill in more information into the country information from the GeoNames-DB.
8
 
9
+ = 2.8.1 =
10
 
11
  (Was not released on wordpress.org)
12
 
13
+ = 2.8.0 =
14
 
15
  * FIX: Localhost now always is a trusted proxy (for standard reverse proxy configurations, however the checkbox "uses a reverse proxy" still needs to be activated.)
16
  * FIX: Timezone was overwritten by country data even though the maxmind data had already detected a timezone.
18
  * Maxmind vendor code was updated to the current version (2.6.0).
19
  * PHP 5.4 is now required (due to the maxmind library).
20
 
21
+ = 2.7.0 =
22
 
23
  * ADD: The options array of `geoip_detect2_get_info_from_ip` now has a new parameter for overriding the current source for a single lookup. See [API usage examples](https://github.com/yellowtree/wp-geoip-detect/wiki/API-Usage-Examples)
24
  * ADD: New filter `geoip_detect2_shortcode_country_select_countries` for the country list of `[geoip_detect2_countries]`
26
  * FIX: Compatibility with CF 4.6 (remove deprecated function call)
27
  * Maxmind vendor code was updated to the current version (2.4.5).
28
 
29
+ = 2.6.0 =
30
 
31
  * ADD: New datasources for Cloudflare & Amazon AWS CloudFront (countries for current IP only).
32
  * ADD: Country information (names, lat/lon, continent, localized in the different languages) are now filled in for sources that only detect the country code (Cloudflare, Amazon, hostip.info)
36
  * FIX: Shortcode didn't use current sitelang as default, but always english
37
  * Maxmind vendor code was updated to the current version (2.4.2).
38
 
39
+ = 2.5.7 =
40
  * ADD: Shortcodes can now optionally specifiy the IP: `[geoip_detect2 property="country.isoCode" ip="(ipv4 or ipv6)"]`
41
  * ADD: Plugin is now translated into German.
42
  * FIX: `geoip_detect2_get_info_from_current_ip()` now also handles the case when REMOTE_ADDR contains multiple IP adresses
43
 
44
+ = 2.5.6 =
45
  * FIX: Removed noticed concerning open_basedir.
46
 
47
+ = 2.5.5 =
48
 
49
  * Clean-up changes to prepare plugin translation.
50
  * FIX: Only show the "no database installed" admin notice to admins (props @meitar)
51
 
52
+ = 2.5.4 =
53
 
54
  * FIX: Manual datasource filepath handling corrected.
55
  * FIX: Potential incompability with BuddyPress removed.
56
 
57
+ = 2.5.3 =
58
 
59
  * FIX: (Security) Add nonces to backend to avoid CSRF (thanks to Gerard Arall).
60
  * FIX: Do not use PHP shortcode tags (<?=) as some servers do not support it with PHP 5.3
61
  * Maxmind vendor code was updated to the current version (2.3.3).
62
 
63
+ = 2.5.2 =
64
  * FIX: Also disallow proxy caching via HTTP header, if possible.
65
  * NEW: Shortcodes for the other API functions: `[geoip_detect2_get_current_source_description]`, `[geoip_detect2_get_client_ip]`, and `[geoip_detect2_get_external_ip_adress]`
66
  * FIX: geoip_detect2_get_external_ip_adress() : do not filter if $unfiltered is true.
67
 
68
+ = 2.5.1 =
69
  * FIX: Upgrade script did change the source.
70
  * FIX: Page caching is only disabled on upgrade when `set_css_country` is disabled.
71
 
72
+ = 2.5.0 =
73
  * CHANGE: The parameter $skipCache is now $options['skipCache']. Using $skipCache is deprecated, but still works.
74
  * NEW: $options['timeout'] for Web-API lookups can now be specified.
75
  * FIX: Hostip.info did not set traits->ipAddress
77
  * NEW: Disable page caching if geoip-API was called (this is configurable in the options). (Supported plugins: WP Super Cache, W3 Total Cache, ZenCache, and possibly others)
78
  * Maxmind vendor code was updated to the current version (2.3.1).
79
 
80
+ = 2.4.3 =
81
  * FIX: Options Page: The checkboxes didn't show (even though the option was saved) since 2.4.0
82
  * NEW: A fixed external IP can now be specified on the options page. (Useful in development scenarios without internet, or mixed internet/intranet cases. You can also use this to speed up things on the production server if you know the IP will not change.)
83
  * NEW: Hidden feature/side-effect: Clicking on save in the General Options section also empties the external IP cache.
84
 
85
+ = 2.4.2 =
86
  * FIX: Trim whitespace of IP adress.
87
  * FIX: some PHP notices.
88
  * FIX: The Installation message "No database installed" failed to install the Maxmind database since 2.4.0
89
  * NEW: Show IPv6-not-supported notice.
90
  * FIX: Add empty fallback functions in case the plugin requirements are not met. (To avoid fatal errors.)
91
 
92
+ = 2.4.1 =
93
  * FIX: Revert IPv6 check. (Sorry for this. I thought PHP compiled without IPv6 would be esoteric.)
94
 
95
+ = 2.4.0 =
96
  This is a major refactor in order to support multiple sources properly. The Lookup and the Options were seperated into 2 screens (accessible in the menu under `Tools` and `Options`, respectively.)
97
 
98
  * NEW: Add a Cache for Web-API-Requests. Consequently, the function geoip_detect2_get_info_from_ip() received a new parameter "$skipCache" to skip this cache if not needed. You can check if the result is coming from the cache by checking $result->extra->cached (it is 0 when not cached, UNIX timestamp of cache event otherwise).
103
  * FIX: Check for IPv6 support for PHP.
104
  * FIX: Country data now also get timezones.
105
 
106
+ = 2.3.1 =
107
  * NEW: API function geoip_detect2_get_current_source_description() (as there are different sources to choose from now)
108
  * FIX: Show error message if PHP < 5.3 (instead of fatal error)
109
 
110
+ = 2.3.0 =
111
  * NEW: Add HostIP.info-Support
112
 
113
+ = 2.2.0 =
114
  * FIX: Update Maxmind Reader to 1.0.3 (fixing issues when the PHP extension mbstring was not installed)
115
  * NEW: Commercial databases are now supported. You can specify a file path in the options.
116
  * NEW: A country database (lite or commercial) database now works as well.
117
  * NEW:
118
  License is now displayed before install.
119
 
120
+ = 2.1.2 =
121
  * FIX: Show error message if PHP < 5.3 (instead of fatal error)
122
  * FIX: Support multiple proxies (but currently only one reverse proxy)
123
 
124
+ = 2.1.1 =
125
  * FIX: Notice "Database missing" should not show during/right after database update.
126
 
127
+ = 2.1.0 =
128
  * NEW: A nagging admin notice shows up on every wp-admin page when no database is installed (yet).
129
 
130
+ = 2.0.1 =
131
  * NEW: Using v2 version of the API.
132
  See Migration Guide at [Github](https://github.com/yellowtree/wp-geoip-detect/wiki/How-to-migrate-from-v1-to-v2)
133
 
138
  * NEW: IPv6 addresses are now supported as well.
139
  * Legacy function names and shortcode should work in most cases. For details check the guide above.
140
 
141
+ = 2.0.0 =
142
 
143
  (Was not released on wordpress.org to make sure that development releases get this update as well.)
144
 
145
+ = 1.8 =
146
  * NEW: Support reverse proxies (you have to enable it in the plugin options.)
147
  * NEW: Shortcode now has a default value when no information for this IP found.
148
 
149
+ = 1.7.1 =
150
  * FIX: Fatal error on cron run
151
 
152
+ = 1.7 =
153
  * FIX: Schedule Database update to do in background immediately after plugin installation/re-activation.
154
  * FIX: Longitude can be smaller than -90
155
 
156
+ = 1.6 =
157
  * NEW: Can add a country- and continent-specific class on the body tag. You need to activate this in the options.
158
  * FIX: Automatic weekly update. (Didn't work on all installations).
159
  * FIX: Do not include Maxmind Libraries again if already included by another plugin/theme
160
 
161
+ = 1.5 =
162
  * FIX: Automatic weekly update. Go to the plugin page (Tools menu) to verify that an update is planned.
163
 
164
+ = 1.4 =
165
  * Feature: Add shortcode [geoip_detect property="(property name)"] for direct use in posts/pages
166
 
167
+ = 1.3 =
168
  * FIX: Manual install works again (was broken since 1.2)
169
 
170
+ = 1.2 =
171
  * FIX: property region_name is now filled again (was broken since 1.1)
172
 
173
+ = 1.1 =
174
  * Add function `geoip_detect_get_external_ip_adress()`: Ask a webservice to tell me the external IP of the webserver.
175
  * New filter: When developing locally, the external IP is used to determine the geographic location.
176
 
177
+ = 1.0 =
178
  * First working release.
api.php CHANGED
@@ -26,7 +26,7 @@ use YellowTree\GeoipDetect\Lib\GetClientIp;
26
  * @param string $ip IP-Adress (IPv4 or IPv6). 'me' is the current IP of the server.
27
  * @param array(string) $locales List of locale codes to use in name property
28
  * from most preferred to least preferred. (Default: Site language, en)
29
- * @param array Property names with options.
30
  * @param boolean $skipCache TRUE: Do not use cache for this request. (Default: FALSE)
31
  * @param string $source Change the source for this request only. (Valid values: 'auto', 'manual', 'precision', 'header', 'hostinfo')
32
  * @param float $timeout Total transaction timeout in seconds (Precision+HostIP.info API only)
@@ -124,9 +124,9 @@ function geoip_detect2_get_info_from_current_ip($locales = null, $options = arra
124
  * Get the Reader class of the currently chosen source.
125
  * (Use this if you want to use other methods than "city" or otherwise customize behavior.)
126
  *
127
- * @param array(string) List of locale codes to use in name property
128
- * from most preferred to least preferred. (Default: Site language, en)
129
- * @param array Property names with options.
130
  * @param string $source Change the source for this request only. (Valid values: 'auto', 'manual', 'precision', 'header', 'hostinfo')
131
  * @param float $timeout Total transaction timeout in seconds (Precision+HostIP.info API only)
132
  * @param int $connectTimeout Initial connection timeout in seconds (Precision API only)
@@ -144,7 +144,7 @@ function geoip_detect2_get_reader($locales = null, $options = array()) {
144
 
145
  /**
146
  * Return a human-readable label of the currently chosen source.
147
- * @param string|\YellowTree\GeoipDetect\DataSources\City Id of the source or the returned record
148
  * @return string The label.
149
  *
150
  * @since 2.3.1
26
  * @param string $ip IP-Adress (IPv4 or IPv6). 'me' is the current IP of the server.
27
  * @param array(string) $locales List of locale codes to use in name property
28
  * from most preferred to least preferred. (Default: Site language, en)
29
+ * @param array $options Property names with options.
30
  * @param boolean $skipCache TRUE: Do not use cache for this request. (Default: FALSE)
31
  * @param string $source Change the source for this request only. (Valid values: 'auto', 'manual', 'precision', 'header', 'hostinfo')
32
  * @param float $timeout Total transaction timeout in seconds (Precision+HostIP.info API only)
124
  * Get the Reader class of the currently chosen source.
125
  * (Use this if you want to use other methods than "city" or otherwise customize behavior.)
126
  *
127
+ * @param array(string) $locales List of locale codes to use in name property
128
+ * from most preferred to least preferred. (Default: Site language, en)
129
+ * @param array $options Property names with options.
130
  * @param string $source Change the source for this request only. (Valid values: 'auto', 'manual', 'precision', 'header', 'hostinfo')
131
  * @param float $timeout Total transaction timeout in seconds (Precision+HostIP.info API only)
132
  * @param int $connectTimeout Initial connection timeout in seconds (Precision API only)
144
 
145
  /**
146
  * Return a human-readable label of the currently chosen source.
147
+ * @param string|\YellowTree\GeoipDetect\DataSources\City $source Id of the source or the returned record
148
  * @return string The label.
149
  *
150
  * @since 2.3.1
composer.lock CHANGED
@@ -8,16 +8,16 @@
8
  "packages": [
9
  {
10
  "name": "composer/ca-bundle",
11
- "version": "1.1.1",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/composer/ca-bundle.git",
15
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169",
20
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169",
21
  "shasum": ""
22
  },
23
  "require": {
@@ -60,7 +60,7 @@
60
  "ssl",
61
  "tls"
62
  ],
63
- "time": "2018-03-29T19:57:20+00:00"
64
  },
65
  {
66
  "name": "geoip2/geoip2",
8
  "packages": [
9
  {
10
  "name": "composer/ca-bundle",
11
+ "version": "1.1.3",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/composer/ca-bundle.git",
15
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
20
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
21
  "shasum": ""
22
  },
23
  "require": {
60
  "ssl",
61
  "tls"
62
  ],
63
+ "time": "2018-10-18T06:09:13+00:00"
64
  },
65
  {
66
  "name": "geoip2/geoip2",
data-sources/auto.php CHANGED
@@ -25,7 +25,7 @@ use YellowTree\GeoipDetect\DataSources\Manual\ManualDataSource;
25
  define('GEOIP_DETECT_DATA_UPDATE_FILENAME', 'GeoLite2-City.mmdb');
26
 
27
  class AutoDataSource extends ManualDataSource
28
- {
29
  public function getId() { return 'auto'; }
30
  public function getLabel() { return __('Automatic download & update of Maxmind GeoIP Lite City', 'geoip-detect'); }
31
  public function getShortLabel() { return sprintf(__('%s (updated monthly)', 'geoip-detect'), parent::getShortLabel()); }
@@ -34,17 +34,17 @@ class AutoDataSource extends ManualDataSource
34
  public function getStatusInformationHTML() {
35
  $html = parent::getStatusInformationHTML();
36
  $date_format = get_option('date_format') . ' ' . get_option('time_format');
37
-
38
  $rescheduled = '';
39
  $next_cron_update = wp_next_scheduled( 'geoipdetectupdate' );
40
- if (!$next_cron_update) {
41
  $rescheduled = ' ' . __('(Was rescheduled just now)', 'geoip-detect');
42
  $this->set_cron_schedule();
43
  $next_cron_update = wp_next_scheduled( 'geoipdetectupdate' );
44
  }
45
- $html .= '<br />' . sprintf(__('Next update: %s', 'geoip-detect'), $next_cron_update ? date_i18n($date_format, $next_cron_update) : __('Never', 'geoip-detect'));
46
  $html .= $rescheduled;
47
-
48
  return $html;
49
  }
50
 
@@ -60,51 +60,51 @@ class AutoDataSource extends ManualDataSource
60
  HTML;
61
  return $html;
62
  }
63
-
64
  public function saveParameters($post) {}
65
-
66
  public function __construct() {
67
  parent::__construct();
68
  add_action('geoipdetectupdate', array($this, 'hook_cron'), 10, 1);
69
  add_action('plugins_loaded', array($this, 'on_plugins_loaded'));
70
  }
71
-
72
  public function on_plugins_loaded() {
73
  if (!defined('GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED'))
74
  define('GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED', false);
75
  }
76
-
77
  public function maxmindGetFilename() {
78
  $data_filename = $this->maxmindGetUploadFilename();
79
  if (!is_readable($data_filename))
80
  $data_filename = '';
81
-
82
  $data_filename = apply_filters('geoip_detect_get_abs_db_filename', $data_filename);
83
  return $data_filename;
84
  }
85
-
86
  protected function maxmindGetUploadFilename() {
87
  $upload_dir = wp_upload_dir();
88
  $dir = $upload_dir['basedir'];
89
-
90
  $filename = $dir . '/' . GEOIP_DETECT_DATA_UPDATE_FILENAME;
91
  return $filename;
92
  }
93
-
94
  protected function download_url($url, $modified = 0) {
95
  // Similar to wordpress download_url, but with custom UA
96
  $url_filename = basename( parse_url( $url, PHP_URL_PATH ) );
97
-
98
  $tmpfname = wp_tempnam( $url_filename );
99
  if ( ! $tmpfname )
100
  return new \WP_Error('http_no_file', __('Could not create temporary file.', 'geoip-detect'));
101
-
102
  $headers = array();
103
  $headers['User-Agent'] = GEOIP_DETECT_USER_AGENT;
104
  if ($modified) {
105
  $headers['If-Modified-Since'] = date('r', $modified);
106
  }
107
-
108
  $response = wp_safe_remote_get( $url, array('timeout' => 300, 'stream' => true, 'filename' => $tmpfname, 'headers' => $headers ) );
109
  $http_response_code = wp_remote_retrieve_response_code( $response );
110
  if (304 === $http_response_code) {
@@ -115,27 +115,27 @@ HTML;
115
  $body = wp_remote_retrieve_body($response);
116
  return new \WP_Error( 'http_404', $http_response_code . ': ' . trim( wp_remote_retrieve_response_message( $response ) ) . ' ' . $body );
117
  }
118
-
119
  return $tmpfname;
120
  }
121
-
122
  public function maxmindUpdate()
123
- {
124
  require_once(ABSPATH.'/wp-admin/includes/file.php');
125
-
126
  $download_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz';
127
  //$download_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz';
128
  $download_url = apply_filters('geoip_detect2_download_url', $download_url);
129
-
130
  $outFile = $this->maxmindGetUploadFilename();
131
  $modified = @filemtime($outFile);
132
  // Download
133
  $tmpFile = $this->download_url($download_url, $modified);
134
-
135
  if (is_wp_error($tmpFile)) {
136
  return $tmpFile->get_error_message();
137
  }
138
-
139
  // Ungzip File
140
  if (!file_exists($tmpFile))
141
  return __('Downloaded file could not be opened for reading.', 'geoip-detect');
@@ -145,23 +145,24 @@ HTML;
145
 
146
  $in = fopen('phar://' . $tmpFile . '/' . $dir . '/GeoLite2-City.mmdb', 'r');
147
  $out = fopen($outFile, 'w');
148
-
149
- if (!$in)
150
  return __('Downloaded file could not be opened for reading.', 'geoip-detect');
151
- if (!$out)
152
  return sprintf(__('Database could not be written (%s).', 'geoip-detect'), $outFile);
153
-
154
- while ( ($string = fread($in, 4096)) != false )
155
  fwrite($out, $string, strlen($string));
156
-
 
157
  fclose($in);
158
  fclose($out);
159
-
160
  unlink($tmpFile);
161
-
162
  return true;
163
  }
164
-
165
  public function hook_cron() {
166
  /**
167
  * Filter:
@@ -172,32 +173,32 @@ HTML;
172
  * @param $immediately_after_activation True if this is fired because the plugin was recently activated (deprecated, will now always be false)
173
  */
174
  $do_it = apply_filters('geoip_detect_cron_do_update', !GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED, false);
175
-
176
  $this->schedule_next_cron_run();
177
-
178
  if ($do_it)
179
  $this->maxmindUpdate();
180
  }
181
-
182
  public function set_cron_schedule()
183
  {
184
  $next = wp_next_scheduled( 'geoipdetectupdate' );
185
- if ( !$next ) {
186
  $this->schedule_next_cron_run();
187
  }
188
  }
189
-
190
  public function schedule_next_cron_run() {
191
  // The Lite databases are updated on the first tuesday of each month. Maybe not at midnight, so we schedule it for the night afterwards.
192
  $next = strtotime('first tuesday of next month + 1 day');
193
  $next += mt_rand(1, WEEK_IN_SECONDS);
194
  wp_schedule_single_event($next, 'geoipdetectupdate');
195
  }
196
-
197
  public function activate() {
198
  $this->set_cron_schedule();
199
  }
200
-
201
  public function deactivate()
202
  {
203
  wp_clear_scheduled_hook('geoipdetectupdate');
25
  define('GEOIP_DETECT_DATA_UPDATE_FILENAME', 'GeoLite2-City.mmdb');
26
 
27
  class AutoDataSource extends ManualDataSource
28
+ {
29
  public function getId() { return 'auto'; }
30
  public function getLabel() { return __('Automatic download & update of Maxmind GeoIP Lite City', 'geoip-detect'); }
31
  public function getShortLabel() { return sprintf(__('%s (updated monthly)', 'geoip-detect'), parent::getShortLabel()); }
34
  public function getStatusInformationHTML() {
35
  $html = parent::getStatusInformationHTML();
36
  $date_format = get_option('date_format') . ' ' . get_option('time_format');
37
+
38
  $rescheduled = '';
39
  $next_cron_update = wp_next_scheduled( 'geoipdetectupdate' );
40
+ if ($next_cron_update === false) {
41
  $rescheduled = ' ' . __('(Was rescheduled just now)', 'geoip-detect');
42
  $this->set_cron_schedule();
43
  $next_cron_update = wp_next_scheduled( 'geoipdetectupdate' );
44
  }
45
+ $html .= '<br />' . sprintf(__('Next update: %s', 'geoip-detect'), $next_cron_update !== false ? date_i18n($date_format, $next_cron_update) : __('Never', 'geoip-detect'));
46
  $html .= $rescheduled;
47
+
48
  return $html;
49
  }
50
 
60
  HTML;
61
  return $html;
62
  }
63
+
64
  public function saveParameters($post) {}
65
+
66
  public function __construct() {
67
  parent::__construct();
68
  add_action('geoipdetectupdate', array($this, 'hook_cron'), 10, 1);
69
  add_action('plugins_loaded', array($this, 'on_plugins_loaded'));
70
  }
71
+
72
  public function on_plugins_loaded() {
73
  if (!defined('GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED'))
74
  define('GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED', false);
75
  }
76
+
77
  public function maxmindGetFilename() {
78
  $data_filename = $this->maxmindGetUploadFilename();
79
  if (!is_readable($data_filename))
80
  $data_filename = '';
81
+
82
  $data_filename = apply_filters('geoip_detect_get_abs_db_filename', $data_filename);
83
  return $data_filename;
84
  }
85
+
86
  protected function maxmindGetUploadFilename() {
87
  $upload_dir = wp_upload_dir();
88
  $dir = $upload_dir['basedir'];
89
+
90
  $filename = $dir . '/' . GEOIP_DETECT_DATA_UPDATE_FILENAME;
91
  return $filename;
92
  }
93
+
94
  protected function download_url($url, $modified = 0) {
95
  // Similar to wordpress download_url, but with custom UA
96
  $url_filename = basename( parse_url( $url, PHP_URL_PATH ) );
97
+
98
  $tmpfname = wp_tempnam( $url_filename );
99
  if ( ! $tmpfname )
100
  return new \WP_Error('http_no_file', __('Could not create temporary file.', 'geoip-detect'));
101
+
102
  $headers = array();
103
  $headers['User-Agent'] = GEOIP_DETECT_USER_AGENT;
104
  if ($modified) {
105
  $headers['If-Modified-Since'] = date('r', $modified);
106
  }
107
+
108
  $response = wp_safe_remote_get( $url, array('timeout' => 300, 'stream' => true, 'filename' => $tmpfname, 'headers' => $headers ) );
109
  $http_response_code = wp_remote_retrieve_response_code( $response );
110
  if (304 === $http_response_code) {
115
  $body = wp_remote_retrieve_body($response);
116
  return new \WP_Error( 'http_404', $http_response_code . ': ' . trim( wp_remote_retrieve_response_message( $response ) ) . ' ' . $body );
117
  }
118
+
119
  return $tmpfname;
120
  }
121
+
122
  public function maxmindUpdate()
123
+ {
124
  require_once(ABSPATH.'/wp-admin/includes/file.php');
125
+
126
  $download_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz';
127
  //$download_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz';
128
  $download_url = apply_filters('geoip_detect2_download_url', $download_url);
129
+
130
  $outFile = $this->maxmindGetUploadFilename();
131
  $modified = @filemtime($outFile);
132
  // Download
133
  $tmpFile = $this->download_url($download_url, $modified);
134
+
135
  if (is_wp_error($tmpFile)) {
136
  return $tmpFile->get_error_message();
137
  }
138
+
139
  // Ungzip File
140
  if (!file_exists($tmpFile))
141
  return __('Downloaded file could not be opened for reading.', 'geoip-detect');
145
 
146
  $in = fopen('phar://' . $tmpFile . '/' . $dir . '/GeoLite2-City.mmdb', 'r');
147
  $out = fopen($outFile, 'w');
148
+
149
+ if (false === $in)
150
  return __('Downloaded file could not be opened for reading.', 'geoip-detect');
151
+ if (false === $out)
152
  return sprintf(__('Database could not be written (%s).', 'geoip-detect'), $outFile);
153
+
154
+ while ( ($string = fread($in, 4096)) !== false ) {
155
  fwrite($out, $string, strlen($string));
156
+ }
157
+
158
  fclose($in);
159
  fclose($out);
160
+
161
  unlink($tmpFile);
162
+
163
  return true;
164
  }
165
+
166
  public function hook_cron() {
167
  /**
168
  * Filter:
173
  * @param $immediately_after_activation True if this is fired because the plugin was recently activated (deprecated, will now always be false)
174
  */
175
  $do_it = apply_filters('geoip_detect_cron_do_update', !GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED, false);
176
+
177
  $this->schedule_next_cron_run();
178
+
179
  if ($do_it)
180
  $this->maxmindUpdate();
181
  }
182
+
183
  public function set_cron_schedule()
184
  {
185
  $next = wp_next_scheduled( 'geoipdetectupdate' );
186
+ if ( $next === false ) {
187
  $this->schedule_next_cron_run();
188
  }
189
  }
190
+
191
  public function schedule_next_cron_run() {
192
  // The Lite databases are updated on the first tuesday of each month. Maybe not at midnight, so we schedule it for the night afterwards.
193
  $next = strtotime('first tuesday of next month + 1 day');
194
  $next += mt_rand(1, WEEK_IN_SECONDS);
195
  wp_schedule_single_event($next, 'geoipdetectupdate');
196
  }
197
+
198
  public function activate() {
199
  $this->set_cron_schedule();
200
  }
201
+
202
  public function deactivate()
203
  {
204
  wp_clear_scheduled_hook('geoipdetectupdate');
data-sources/manual.php CHANGED
@@ -25,67 +25,69 @@ use YellowTree\GeoipDetect\DataSources\AbstractDataSource;
25
  define('GEOIP_DETECT_DATA_FILENAME', 'GeoLite2-City.mmdb');
26
 
27
  class ManualDataSource extends AbstractDataSource {
28
-
29
  public function getId() { return 'manual'; }
30
  public function getLabel() { return __('Manual download & update of a Maxmind City or Country database', 'geoip-detect'); }
31
 
32
  public function getDescriptionHTML() { return __('<a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" target="_blank">Free version</a> - <a href="https://www.maxmind.com/en/geoip2-country-database" target="_blank">Commercial Version</a>', 'geoip-detect'); }
33
  public function getStatusInformationHTML() {
34
  $built = $last_update = 0;
 
 
35
  $date_format = get_option('date_format') . ' ' . get_option('time_format');
36
  $file = $this->maxmindGetFilename();
37
-
38
  if (!$file)
39
  return '<b>' . __('No Maxmind database found.', 'geoip-detect') . '</b>';
40
-
41
  $relative_file = geoip_detect_get_relative_path(ABSPATH, $file);
42
-
43
  $html[] = sprintf(__('Database file: %s', 'geoip-detect'), $relative_file);
44
-
45
- try {
46
  $reader = $this->getReader();
47
  if ($reader) {
48
  $metadata = $reader->metadata();
49
  $built = $metadata->buildEpoch;
50
  $last_update = @filemtime($file);
51
  }
52
- } catch (\Exception $e) { }
53
-
54
  $html[] = sprintf(__('Last updated: %s', 'geoip-detect'), $last_update ? date_i18n($date_format, $last_update) : __('Never', 'geoip-detect'));
55
  $html[] = sprintf(__('Database data from: %s', 'geoip-detect'), date_i18n($date_format, $built) );
56
-
57
  return implode('<br>', $html);
58
  }
59
 
60
- public function getParameterHTML() {
61
  $manual_file = esc_attr(get_option('geoip-detect-manual_file'));
62
  $current_value = '';
63
-
64
- if ( get_option('geoip-detect-manual_file_validated') &&
65
  get_option('geoip-detect-manual_file') != get_option('geoip-detect-manual_file_validated') &&
66
  ABSPATH . get_option('geoip-detect-manual_file') != get_option('geoip-detect-manual_file_validated')
67
  ) {
68
  $current_value = '<br >' . sprintf(__('Current value: %s', 'geoip-detect'), get_option('geoip-detect-manual_file_validated'));
69
- }
70
 
71
  $label = __('Filepath to mmdb-file:', 'geoip-detect');
72
  $desc = __('e.g. wp-content/uploads/GeoLite2-Country.mmdb or absolute filepath', 'geoip-detect');
73
  $html = <<<HTML
74
  <p>$label <input type="text" size="40" name="options_manual[manual_file]" value="$manual_file" /></p>
75
  <span class="detail-box">$desc $current_value</span>
76
- <br />
77
  HTML;
78
-
79
  return $html;
80
  }
81
-
82
  public function saveParameters($post) {
83
  $message = '';
84
-
85
  $file = @$post['options_manual']['manual_file'];
86
  if (!empty($file)) {
87
  update_option('geoip-detect-manual_file', $file);
88
-
89
  $validated_filename = self::maxmindValidateFilename($file);
90
  if (empty($validated_filename)) {
91
  $message .= __('The manual datafile has not been found or is not a mmdb-File. ', 'geoip-detect');
@@ -93,15 +95,15 @@ HTML;
93
  update_option('geoip-detect-manual_file_validated', $validated_filename);
94
  }
95
  }
96
-
97
  return $message;
98
  }
99
-
100
  public function getShortLabel() { return $this->maxmindGetFileDescription(); }
101
 
102
  public function getReader($locales = array('en'), $options = array()) {
103
  $reader = null;
104
-
105
  $data_file = $this->maxmindGetFilename();
106
  if ($data_file) {
107
  try {
@@ -111,18 +113,18 @@ HTML;
111
  printf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $data_file, $e->getMessage());
112
  }
113
  }
114
-
115
  return $reader;
116
  }
117
 
118
- public function isWorking() {
119
  $filename = $this->maxmindGetFilename();
120
  if (!is_readable($filename))
121
  return false;
122
 
123
  return true;
124
  }
125
-
126
  public function maxmindGetFilename() {
127
  $data_filename = get_option('geoip-detect-manual_file_validated');
128
 
@@ -130,43 +132,43 @@ HTML;
130
  if (!$data_filename || !file_exists($data_filename)) {
131
  $data_filename = GEOIP_PLUGIN_DIR . '/' . GEOIP_DETECT_DATA_FILENAME;
132
  }
133
-
134
  if (!file_exists($data_filename)) {
135
  // Maybe site root changed?
136
  $data_filename = $this->maxmindValidateFilename(get_option('geoip-detect-manual_file'));
137
  }
138
-
139
  $data_filename = apply_filters('geoip_detect_get_abs_db_filename', $data_filename);
140
-
141
  return $data_filename;
142
  }
143
-
144
  public static function maxmindValidateFilename($filename) {
145
  // Maybe make path absolute
146
  if (file_exists(ABSPATH . $filename))
147
  $filename = ABSPATH . $filename;
148
-
149
  if (!is_readable($filename))
150
  return '';
151
-
152
  try {
153
  $reader = new \GeoIp2\Database\Reader($filename);
154
- $metadata = $reader->metadata();
155
  $reader->close();
156
  } catch ( \Exception $e ) {
157
  // Not readable, so do not accept this filename
158
  return '';
159
  }
160
-
161
  return $filename;
162
  }
163
-
164
  protected function maxmindGetFileDescription() {
165
  $reader = $this->getReader();
166
-
167
  if (!method_exists($reader, 'metadata'))
168
  return __('Maxmind File Database (file does not exist or is not readable)', 'geoip-detect');
169
-
170
  try {
171
  $metadata = $reader->metadata();
172
  $desc = $metadata->description;
@@ -174,7 +176,7 @@ HTML;
174
  } catch (\Exception $e) {
175
  return __('Maxmind File Database (file does not exist or is not readable)', 'geoip-detect');
176
  }
177
- }
178
  }
179
 
180
  geoip_detect2_register_source(new ManualDataSource());
25
  define('GEOIP_DETECT_DATA_FILENAME', 'GeoLite2-City.mmdb');
26
 
27
  class ManualDataSource extends AbstractDataSource {
28
+
29
  public function getId() { return 'manual'; }
30
  public function getLabel() { return __('Manual download & update of a Maxmind City or Country database', 'geoip-detect'); }
31
 
32
  public function getDescriptionHTML() { return __('<a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" target="_blank">Free version</a> - <a href="https://www.maxmind.com/en/geoip2-country-database" target="_blank">Commercial Version</a>', 'geoip-detect'); }
33
  public function getStatusInformationHTML() {
34
  $built = $last_update = 0;
35
+ $html = array();
36
+
37
  $date_format = get_option('date_format') . ' ' . get_option('time_format');
38
  $file = $this->maxmindGetFilename();
39
+
40
  if (!$file)
41
  return '<b>' . __('No Maxmind database found.', 'geoip-detect') . '</b>';
42
+
43
  $relative_file = geoip_detect_get_relative_path(ABSPATH, $file);
44
+
45
  $html[] = sprintf(__('Database file: %s', 'geoip-detect'), $relative_file);
46
+
47
+ try {
48
  $reader = $this->getReader();
49
  if ($reader) {
50
  $metadata = $reader->metadata();
51
  $built = $metadata->buildEpoch;
52
  $last_update = @filemtime($file);
53
  }
54
+ } catch (\Exception $e) { /* File is corrupt? */ }
55
+
56
  $html[] = sprintf(__('Last updated: %s', 'geoip-detect'), $last_update ? date_i18n($date_format, $last_update) : __('Never', 'geoip-detect'));
57
  $html[] = sprintf(__('Database data from: %s', 'geoip-detect'), date_i18n($date_format, $built) );
58
+
59
  return implode('<br>', $html);
60
  }
61
 
62
+ public function getParameterHTML() {
63
  $manual_file = esc_attr(get_option('geoip-detect-manual_file'));
64
  $current_value = '';
65
+
66
+ if ( get_option('geoip-detect-manual_file_validated') &&
67
  get_option('geoip-detect-manual_file') != get_option('geoip-detect-manual_file_validated') &&
68
  ABSPATH . get_option('geoip-detect-manual_file') != get_option('geoip-detect-manual_file_validated')
69
  ) {
70
  $current_value = '<br >' . sprintf(__('Current value: %s', 'geoip-detect'), get_option('geoip-detect-manual_file_validated'));
71
+ }
72
 
73
  $label = __('Filepath to mmdb-file:', 'geoip-detect');
74
  $desc = __('e.g. wp-content/uploads/GeoLite2-Country.mmdb or absolute filepath', 'geoip-detect');
75
  $html = <<<HTML
76
  <p>$label <input type="text" size="40" name="options_manual[manual_file]" value="$manual_file" /></p>
77
  <span class="detail-box">$desc $current_value</span>
78
+ <br />
79
  HTML;
80
+
81
  return $html;
82
  }
83
+
84
  public function saveParameters($post) {
85
  $message = '';
86
+
87
  $file = @$post['options_manual']['manual_file'];
88
  if (!empty($file)) {
89
  update_option('geoip-detect-manual_file', $file);
90
+
91
  $validated_filename = self::maxmindValidateFilename($file);
92
  if (empty($validated_filename)) {
93
  $message .= __('The manual datafile has not been found or is not a mmdb-File. ', 'geoip-detect');
95
  update_option('geoip-detect-manual_file_validated', $validated_filename);
96
  }
97
  }
98
+
99
  return $message;
100
  }
101
+
102
  public function getShortLabel() { return $this->maxmindGetFileDescription(); }
103
 
104
  public function getReader($locales = array('en'), $options = array()) {
105
  $reader = null;
106
+
107
  $data_file = $this->maxmindGetFilename();
108
  if ($data_file) {
109
  try {
113
  printf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $data_file, $e->getMessage());
114
  }
115
  }
116
+
117
  return $reader;
118
  }
119
 
120
+ public function isWorking() {
121
  $filename = $this->maxmindGetFilename();
122
  if (!is_readable($filename))
123
  return false;
124
 
125
  return true;
126
  }
127
+
128
  public function maxmindGetFilename() {
129
  $data_filename = get_option('geoip-detect-manual_file_validated');
130
 
132
  if (!$data_filename || !file_exists($data_filename)) {
133
  $data_filename = GEOIP_PLUGIN_DIR . '/' . GEOIP_DETECT_DATA_FILENAME;
134
  }
135
+
136
  if (!file_exists($data_filename)) {
137
  // Maybe site root changed?
138
  $data_filename = $this->maxmindValidateFilename(get_option('geoip-detect-manual_file'));
139
  }
140
+
141
  $data_filename = apply_filters('geoip_detect_get_abs_db_filename', $data_filename);
142
+
143
  return $data_filename;
144
  }
145
+
146
  public static function maxmindValidateFilename($filename) {
147
  // Maybe make path absolute
148
  if (file_exists(ABSPATH . $filename))
149
  $filename = ABSPATH . $filename;
150
+
151
  if (!is_readable($filename))
152
  return '';
153
+
154
  try {
155
  $reader = new \GeoIp2\Database\Reader($filename);
156
+ $reader->metadata(); /* Try to read from it ... the result doesn't actually interest me. */
157
  $reader->close();
158
  } catch ( \Exception $e ) {
159
  // Not readable, so do not accept this filename
160
  return '';
161
  }
162
+
163
  return $filename;
164
  }
165
+
166
  protected function maxmindGetFileDescription() {
167
  $reader = $this->getReader();
168
+
169
  if (!method_exists($reader, 'metadata'))
170
  return __('Maxmind File Database (file does not exist or is not readable)', 'geoip-detect');
171
+
172
  try {
173
  $metadata = $reader->metadata();
174
  $desc = $metadata->description;
176
  } catch (\Exception $e) {
177
  return __('Maxmind File Database (file does not exist or is not readable)', 'geoip-detect');
178
  }
179
+ }
180
  }
181
 
182
  geoip_detect2_register_source(new ManualDataSource());
data-sources/registry.php CHANGED
@@ -64,7 +64,7 @@ class DataSourceRegistry {
64
 
65
  /**
66
  * Returns the source known by this id.
67
- * @param string Source id
68
  * @return \YellowTree\GeoipDetect\DataSources\AbstractDataSource
69
  */
70
  public function getSource($id) {
64
 
65
  /**
66
  * Returns the source known by this id.
67
+ * @param string $id Source id
68
  * @return \YellowTree\GeoipDetect\DataSources\AbstractDataSource
69
  */
70
  public function getSource($id) {
geoip-detect.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.yellowtree.de
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
- Version: 2.9.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
@@ -16,7 +16,7 @@ Requires WP: 3.5
16
  Requires PHP: 5.4
17
  */
18
 
19
- define('GEOIP_DETECT_VERSION', '2.9.0');
20
 
21
  /*
22
  Copyright 2013-2018 Yellow Tree, Siegen, Germany
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
+ Version: 2.9.1
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
16
  Requires PHP: 5.4
17
  */
18
 
19
+ define('GEOIP_DETECT_VERSION', '2.9.1');
20
 
21
  /*
22
  Copyright 2013-2018 Yellow Tree, Siegen, Germany
init.php CHANGED
@@ -16,7 +16,7 @@ function geoip_detect_defines() {
16
 
17
 
18
  if (!defined('GEOIP_DETECT_IPV6_SUPPORTED'))
19
- define('GEOIP_DETECT_IPV6_SUPPORTED', defined('AF_INET6'));
20
 
21
  if (!defined('GEOIP_DETECT_USER_AGENT'))
22
  define('GEOIP_DETECT_USER_AGENT', 'GeoIP Detect ' . GEOIP_DETECT_VERSION);
@@ -24,6 +24,13 @@ function geoip_detect_defines() {
24
  add_action('plugins_loaded', 'geoip_detect_defines');
25
 
26
 
 
 
 
 
 
 
 
27
  // Load Locales
28
  function geoip_detect_load_textdomain() {
29
  load_plugin_textdomain( 'geoip-detect', false, GEOIP_PLUGIN_DIR . '/languages' );
16
 
17
 
18
  if (!defined('GEOIP_DETECT_IPV6_SUPPORTED'))
19
+ define('GEOIP_DETECT_IPV6_SUPPORTED', geoip_detect_check_ipv6_support());
20
 
21
  if (!defined('GEOIP_DETECT_USER_AGENT'))
22
  define('GEOIP_DETECT_USER_AGENT', 'GeoIP Detect ' . GEOIP_DETECT_VERSION);
24
  add_action('plugins_loaded', 'geoip_detect_defines');
25
 
26
 
27
+ function geoip_detect_check_ipv6_support() {
28
+ if (defined('AF_INET6')) {
29
+ return true;
30
+ }
31
+ return @inet_pton('::1') !== false;
32
+ }
33
+
34
  // Load Locales
35
  function geoip_detect_load_textdomain() {
36
  load_plugin_textdomain( 'geoip-detect', false, GEOIP_PLUGIN_DIR . '/languages' );
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: benjaminpick
3
  Tags: geoip, maxmind, geolocation, locator
4
  Requires at least: 3.5
5
- Tested up to: 4.9
6
  Requires PHP: 5.4
7
  Stable tag: trunk
8
  License: GPLv3 or later
@@ -48,9 +48,12 @@ See [API Documentation](https://github.com/yellowtree/wp-geoip-detect/wiki/API-D
48
  * You could show the store nearest to your customer
49
  * You show or hide content specific to a geographic target group
50
  * Etc. ... You tell me! I'm rather curious what you'll do with this plugin!
 
51
 
52
  **System Requirements**: You will need at least PHP 5.4.
53
 
 
 
54
  *This extension is "charity-ware". If you are happy with it, please [leave a tip](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BSYUZHS8FH3CL) for the benefit of [this charity](http://www.jmem-hainichen.de/homepage). (See [FAQ](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#what-you-mean-by-this-plugin-is-charity-ware) for more infos.)*
55
 
56
  *This product can provide GeoLite2 data created by MaxMind, available from http://www.maxmind.com.*
@@ -81,7 +84,7 @@ Does `geoip_detect2_get_info_from_current_ip()` return the same country, regardl
81
 
82
  [Does this plugin work in a MultiSite-Network environment?](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#does-this-plugin-work-in-a-multisite-network-environment)
83
 
84
- [What you mean by "This plugin is charity-ware"?](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#what-you-mean-by-this-plugin-is-charity-ware)
85
 
86
  **Further documentation**
87
 
@@ -98,6 +101,10 @@ Does `geoip_detect2_get_info_from_current_ip()` return the same country, regardl
98
 
99
  == Upgrade Notice ==
100
 
 
 
 
 
101
  = 2.9.0 =
102
 
103
  There have been changes to the reverse proxy logic. If you have enabled a reverse proxy, check if the detected IP is correct.
@@ -105,6 +112,10 @@ New: Shortcode for showing/hiding content!
105
 
106
  == Changelog ==
107
 
 
 
 
 
108
  = 2.9.0 =
109
  * Add default Privacy text for GDPR compliance.
110
  * The reverse proxy logic was heavily changed. If you run into configuration errors, try the debug panel (see link after the reverse proxy option).
2
  Contributors: benjaminpick
3
  Tags: geoip, maxmind, geolocation, locator
4
  Requires at least: 3.5
5
+ Tested up to: 5.0
6
  Requires PHP: 5.4
7
  Stable tag: trunk
8
  License: GPLv3 or later
48
  * You could show the store nearest to your customer
49
  * You show or hide content specific to a geographic target group
50
  * Etc. ... You tell me! I'm rather curious what you'll do with this plugin!
51
+ * Be careful to comply to the applicable laws. For example, it is illegal in the EU to change prices based on GeoIP-Detection ... See Regulation (EU) 2018/302 (going into effect 03 Dec 2018).
52
 
53
  **System Requirements**: You will need at least PHP 5.4.
54
 
55
+ *GDPR: This plugin does not store any cookie or user-dependent data. If you use a web-based source (hostip.info, Maxmind Precision), the plugin stores all IPs that visited the site in a cache (by default for 7 days) for performance reasons. If you want to disable this behavior, add `define('GEOIP_DETECT_READER_CACHE_TIME', 0);` in your theme's `function.php`. Be especially careful when using this information to change prices or selling options, as this might not be legal.*
56
+
57
  *This extension is "charity-ware". If you are happy with it, please [leave a tip](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BSYUZHS8FH3CL) for the benefit of [this charity](http://www.jmem-hainichen.de/homepage). (See [FAQ](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#what-you-mean-by-this-plugin-is-charity-ware) for more infos.)*
58
 
59
  *This product can provide GeoLite2 data created by MaxMind, available from http://www.maxmind.com.*
84
 
85
  [Does this plugin work in a MultiSite-Network environment?](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#does-this-plugin-work-in-a-multisite-network-environment)
86
 
87
+ [What do you mean by "This plugin is charity-ware"?](https://github.com/yellowtree/wp-geoip-detect/wiki/FAQ#what-do-you-mean-by-this-plugin-is-charity-ware)
88
 
89
  **Further documentation**
90
 
101
 
102
  == Upgrade Notice ==
103
 
104
+ = 2.9.1 =
105
+
106
+ Online Shops: Be careful to comply to (EU) 2018/302 (going into effect 03 Dec 2018) in how you use this plugin !
107
+
108
  = 2.9.0 =
109
 
110
  There have been changes to the reverse proxy logic. If you have enabled a reverse proxy, check if the detected IP is correct.
112
 
113
  == Changelog ==
114
 
115
+ = 2.9.1 =
116
+ * NEW: Add ContactForm7-Mailtags so that the user information formatting can be customized: `geoip_detect2_get_client_ip`, `geoip_detect2_get_current_source_description`, `geoip_detect2_property_country`, `geoip_detect2_property_state`, `geoip_detect2_property_city`. Of course you can still use `geoip_detect2_user_info` as shortcode for all these informations.
117
+ * FIX: On some server, the plugin had wrongly assumed that PHP was compiled without IPv6-support.
118
+
119
  = 2.9.0 =
120
  * Add default Privacy text for GDPR compliance.
121
  * The reverse proxy logic was heavily changed. If you run into configuration errors, try the debug panel (see link after the reverse proxy option).
shortcode.php CHANGED
@@ -112,10 +112,10 @@ function geoip_detect2_shortcode($attr, $content, $shortcodeName)
112
  add_shortcode('geoip_detect2', 'geoip_detect2_shortcode');
113
 
114
  /**
115
- * [geoip_detect2_shortcode_get_property description]
116
- * @param [type] $userInfo [description]
117
- * @param [type] $propertyName [description]
118
- * @return [type] [description]
119
  * @throws \RuntimeException (if Property name invalid)
120
  */
121
  function geoip_detect2_shortcode_get_property($userInfo, $propertyName) {
@@ -147,9 +147,9 @@ function geoip_detect2_shortcode_get_property($userInfo, $propertyName) {
147
  return $return;
148
  }
149
 
150
- function geoip_detect2_shortcode_client_ip($attr) {
151
  $client_ip = geoip_detect2_get_client_ip();
152
- geoip_detect_normalize_ip($client_ip);
153
 
154
  return $client_ip;
155
  }
@@ -157,15 +157,16 @@ add_shortcode('geoip_detect2_get_client_ip', 'geoip_detect2_shortcode_client_ip'
157
 
158
  function geoip_detect2_shortcode_get_external_ip_adress($attr) {
159
  $external_ip = geoip_detect2_get_external_ip_adress();
 
160
 
161
  return $external_ip;
162
  }
163
  add_shortcode('geoip_detect2_get_external_ip_adress', 'geoip_detect2_shortcode_get_external_ip_adress');
164
 
165
- function geoip_detect2_shortcode_get_current_source_description($attr) {
166
- $external_ip = geoip_detect2_get_current_source_description();
167
 
168
- return $external_ip;
169
  }
170
  add_shortcode('geoip_detect2_get_current_source_description', 'geoip_detect2_shortcode_get_current_source_description');
171
 
@@ -217,7 +218,7 @@ function geoip_detect2_shortcode_country_select($attr) {
217
  $select_attrs = array(
218
  'name' => !empty($attr['name']) ? $attr['name'] : 'geoip-countries',
219
  'id' => @$attr['id'],
220
- 'class' => @$attr['class'],
221
  'aria-required' => !empty($attr['required']) ? 'required' : '',
222
  'aria-invalid' => !empty($attr['invalid']) ? $attr['invalid'] : '',
223
  );
@@ -312,8 +313,8 @@ function geoip_detect2_shortcode_country_select_wpcf7($tag) {
312
  return $html;
313
  }
314
 
315
- add_action( 'wpcf7_init', 'geoip_detect2_add_shortcodes' );
316
- function geoip_detect2_add_shortcodes() {
317
  if (function_exists('wpcf7_add_form_tag')) {
318
  // >=CF 4.6
319
  wpcf7_add_form_tag(array('geoip_detect2_countries', 'geoip_detect2_countries*'), 'geoip_detect2_shortcode_country_select_wpcf7', true);
@@ -323,30 +324,68 @@ function geoip_detect2_add_shortcodes() {
323
  }
324
  }
325
 
326
-
327
  function geoip_detect2_shortcode_user_info_wpcf7($output, $name, $isHtml) {
328
- if ($name != 'geoip_detect2_user_info')
329
- return $output;
330
-
331
- $lines = array();
332
-
333
- $lines[] = sprintf(__('IP of the user: %s', 'geoip-detect'), geoip_detect2_get_client_ip());
334
- $info = geoip_detect2_get_info_from_current_ip();
335
- if ($info->country->name)
336
- $lines[] = sprintf(__('Country: %s', 'geoip-detect'), $info->country->name);
337
- if ($info->mostSpecificSubdivision->name)
338
- $lines[] = sprintf(__('State or region: %s', 'geoip-detect'), $info->mostSpecificSubdivision->name);
339
- if ($info->city->name)
340
- $lines[] = sprintf(__('City: %s', 'geoip-detect'), $info->city->name);
341
- $lines[] = '';
342
- $lines[] = sprintf(__('Data from: %s', 'geoip-detect'), geoip_detect2_get_current_source_description());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
  $lineBreak = $isHtml ? "<br>" : "\n";
345
  return implode($lineBreak, $lines);
346
  }
347
- add_filter( 'wpcf7_special_mail_tags', 'geoip_detect2_shortcode_user_info_wpcf7', 15, 3 );
348
 
349
- function geoip_detect_shortcode_user_info($attr) {
350
  return geoip_detect2_shortcode_user_info_wpcf7('', 'geoip_detect2_user_info', true);
351
  }
352
  add_shortcode('geoip_detect2_user_info', 'geoip_detect_shortcode_user_info');
@@ -413,24 +452,32 @@ add_shortcode('geoip_detect2_user_info', 'geoip_detect_shortcode_user_info');
413
  function geoip_detect2_shortcode_show_if($attr, $content = null, $shortcodeName = '') {
414
  $showContentIfMatch = ($shortcodeName == 'geoip_detect2_show_if') ? true : false;
415
 
416
- $attr = shortcode_atts(array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  'lang' => null,
418
  'skip_cache' => 'false',
419
  'property' => null,
420
  'property_value' => null,
421
  'not_property_value' => null,
422
- 'continent' => null,
423
- 'country' => null,
424
- 'most_specific_subdivision' => null,
425
- 'region' => null,
426
- 'state' => null,
427
- 'city' => null,
428
- 'not_country' => null,
429
- 'not_most_specific_subdivision' => null,
430
- 'not_region' => null,
431
- 'not_state' => null,
432
- 'not_city' => null,),
433
- $attr, $shortcodeName);
434
 
435
  $skipCache = filter_var($attr['skip_cache'], FILTER_VALIDATE_BOOLEAN );
436
 
@@ -442,22 +489,6 @@ function geoip_detect2_shortcode_show_if($attr, $content = null, $shortcodeName
442
  $info = geoip_detect2_get_info_from_current_ip($locales, $options);
443
  $isConditionMatching = true;
444
 
445
- /* Attribute Conditions. Order is not important, as they are combined with an transitive AND condition */
446
- $attributeNames = array(
447
- 'continent' => 'continent',
448
- 'not_continent' => 'continent',
449
- 'country' => 'country',
450
- 'not_country' => 'country',
451
- 'most_specific_subdivision' => 'mostSpecificSubdivision',
452
- 'region' => 'mostSpecificSubdivision',
453
- 'state' => 'mostSpecificSubdivision',
454
- 'not_most_specific_subdivision' => 'mostSpecificSubdivision',
455
- 'not_region' => 'mostSpecificSubdivision',
456
- 'not_state' => 'mostSpecificSubdivision',
457
- 'city' => 'city',
458
- 'not_city' => 'city',
459
- );
460
-
461
  foreach ($attributeNames as $shortcodeParamName => $maxmindName) {
462
  if (!empty($attr[$shortcodeParamName])) {
463
  // Determine Actual MaxMind Value(s) for Attribute
@@ -483,7 +514,9 @@ function geoip_detect2_shortcode_show_if($attr, $content = null, $shortcodeName
483
  }
484
  }
485
 
 
486
  if (!empty($attr['property']) && (!empty($attr['property_value']) || !empty($attr['not_property_value'])) ) {
 
487
  try {
488
  $actualValue = geoip_detect2_shortcode_get_property($info, $attr['property']);
489
 
@@ -494,7 +527,7 @@ function geoip_detect2_shortcode_show_if($attr, $content = null, $shortcodeName
494
  $subConditionMatching = ! geoip_detect2_shortcode_check_subcondition($attr['not_property_value'], $actualValue);
495
  }
496
  } catch (\Exception $e) {
497
- $subConditionMatching = false;
498
  }
499
 
500
  $isConditionMatching = $isConditionMatching && $subConditionMatching;
112
  add_shortcode('geoip_detect2', 'geoip_detect2_shortcode');
113
 
114
  /**
115
+ * Get property from object by string
116
+ * @param YellowTree\GeoipDetect\DataSources\City $userInfo GeoIP information object
117
+ * @param string $propertyName property name, e.g. "city.isoCode"
118
+ * @return string|\GeoIp2\Record\AbstractRecord Property Value
119
  * @throws \RuntimeException (if Property name invalid)
120
  */
121
  function geoip_detect2_shortcode_get_property($userInfo, $propertyName) {
147
  return $return;
148
  }
149
 
150
+ function geoip_detect2_shortcode_client_ip() {
151
  $client_ip = geoip_detect2_get_client_ip();
152
+ $client_ip = geoip_detect_normalize_ip($client_ip);
153
 
154
  return $client_ip;
155
  }
157
 
158
  function geoip_detect2_shortcode_get_external_ip_adress($attr) {
159
  $external_ip = geoip_detect2_get_external_ip_adress();
160
+ $external_ip = geoip_detect_normalize_ip($external_ip);
161
 
162
  return $external_ip;
163
  }
164
  add_shortcode('geoip_detect2_get_external_ip_adress', 'geoip_detect2_shortcode_get_external_ip_adress');
165
 
166
+ function geoip_detect2_shortcode_get_current_source_description() {
167
+ $return = geoip_detect2_get_current_source_description();
168
 
169
+ return $return;
170
  }
171
  add_shortcode('geoip_detect2_get_current_source_description', 'geoip_detect2_shortcode_get_current_source_description');
172
 
218
  $select_attrs = array(
219
  'name' => !empty($attr['name']) ? $attr['name'] : 'geoip-countries',
220
  'id' => @$attr['id'],
221
+ 'class' => !empty($attr['class']) ? $attr['class'] : 'geoip_detect2_countries',
222
  'aria-required' => !empty($attr['required']) ? 'required' : '',
223
  'aria-invalid' => !empty($attr['invalid']) ? $attr['invalid'] : '',
224
  );
313
  return $html;
314
  }
315
 
316
+ add_action( 'wpcf7_init', 'geoip_detect2_add_wpcf7_shortcodes' );
317
+ function geoip_detect2_add_wpcf7_shortcodes() {
318
  if (function_exists('wpcf7_add_form_tag')) {
319
  // >=CF 4.6
320
  wpcf7_add_form_tag(array('geoip_detect2_countries', 'geoip_detect2_countries*'), 'geoip_detect2_shortcode_country_select_wpcf7', true);
324
  }
325
  }
326
 
 
327
  function geoip_detect2_shortcode_user_info_wpcf7($output, $name, $isHtml) {
328
+ $lines = array();
329
+
330
+ switch($name) {
331
+ case 'geoip_detect2_get_client_ip':
332
+ $lines[] = geoip_detect2_get_client_ip();
333
+ break;
334
+ case 'geoip_detect2_get_current_source_description':
335
+ $lines[] = geoip_detect2_get_current_source_description();
336
+ break;
337
+ case 'geoip_detect2_property_country':
338
+ $info = geoip_detect2_get_info_from_current_ip();
339
+ $lines[] = $info->country->name;
340
+ break;
341
+ case 'geoip_detect2_property_most_specific_subdivision':
342
+ case 'geoip_detect2_property_state':
343
+ case 'geoip_detect2_property_region':
344
+ $name = 'geoip_detect2_property_most_specific_subdivision';
345
+ $info = geoip_detect2_get_info_from_current_ip();
346
+ $lines[] = $info->mostSpecificSubdivision->name;
347
+ break;
348
+ case 'geoip_detect2_property_city':
349
+ $info = geoip_detect2_get_info_from_current_ip();
350
+ $lines[] = $info->city->name;
351
+ break;
352
+
353
+ case 'geoip_detect2_user_info':
354
+ $lines[] = sprintf(__('IP of the user: %s', 'geoip-detect'), geoip_detect2_get_client_ip());
355
+
356
+ $info = geoip_detect2_get_info_from_current_ip();
357
+ if ($info->country->name)
358
+ $lines[] = sprintf(__('Country: %s', 'geoip-detect'), $info->country->name);
359
+ if ($info->mostSpecificSubdivision->name)
360
+ $lines[] = sprintf(__('State or region: %s', 'geoip-detect'), $info->mostSpecificSubdivision->name);
361
+ if ($info->city->name)
362
+ $lines[] = sprintf(__('City: %s', 'geoip-detect'), $info->city->name);
363
+
364
+ $lines[] = '';
365
+ $lines[] = sprintf(__('Data from: %s', 'geoip-detect'), geoip_detect2_get_current_source_description());
366
+ break;
367
+
368
+ default:
369
+ return '';
370
+ }
371
+
372
+ /**
373
+ * Filter: geoip2_detect_wpcf7_special_mail_tags
374
+ * This filter is called if a GeoIP-detection-tag was used.
375
+ *
376
+ * @param array $lines - Output lines
377
+ * @param string $name - Name of the WPCF 7 Tag that was used
378
+ * @param bool $isHtml - Whether HTML or Plain Text output should be used
379
+ * @return array Output lines
380
+ */
381
+ $lines = apply_filters('geoip2_detect_wpcf7_special_mail_tags', $lines, $name, $isHtml);
382
 
383
  $lineBreak = $isHtml ? "<br>" : "\n";
384
  return implode($lineBreak, $lines);
385
  }
386
+ add_filter( 'wpcf7_special_mail_tags', 'geoip_detect2_shortcode_user_info_wpcf7', 18, 3 );
387
 
388
+ function geoip_detect_shortcode_user_info() {
389
  return geoip_detect2_shortcode_user_info_wpcf7('', 'geoip_detect2_user_info', true);
390
  }
391
  add_shortcode('geoip_detect2_user_info', 'geoip_detect_shortcode_user_info');
452
  function geoip_detect2_shortcode_show_if($attr, $content = null, $shortcodeName = '') {
453
  $showContentIfMatch = ($shortcodeName == 'geoip_detect2_show_if') ? true : false;
454
 
455
+ /* Attribute Conditions. Order is not important, as they are combined with an transitive AND condition */
456
+ $attributeNames = array(
457
+ 'continent' => 'continent',
458
+ 'not_continent' => 'continent',
459
+ 'country' => 'country',
460
+ 'not_country' => 'country',
461
+ 'most_specific_subdivision' => 'mostSpecificSubdivision',
462
+ 'region' => 'mostSpecificSubdivision',
463
+ 'state' => 'mostSpecificSubdivision',
464
+ 'not_most_specific_subdivision' => 'mostSpecificSubdivision',
465
+ 'not_region' => 'mostSpecificSubdivision',
466
+ 'not_state' => 'mostSpecificSubdivision',
467
+ 'city' => 'city',
468
+ 'not_city' => 'city',
469
+ );
470
+
471
+ $attrDefaults = array(
472
  'lang' => null,
473
  'skip_cache' => 'false',
474
  'property' => null,
475
  'property_value' => null,
476
  'not_property_value' => null,
477
+ );
478
+ $attrDefaults = array_merge($attrDefaults, array_fill_keys(array_keys($attributeNames), null));
479
+
480
+ $attr = shortcode_atts($attrDefaults, $attr, $shortcodeName);
 
 
 
 
 
 
 
 
481
 
482
  $skipCache = filter_var($attr['skip_cache'], FILTER_VALIDATE_BOOLEAN );
483
 
489
  $info = geoip_detect2_get_info_from_current_ip($locales, $options);
490
  $isConditionMatching = true;
491
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
  foreach ($attributeNames as $shortcodeParamName => $maxmindName) {
493
  if (!empty($attr[$shortcodeParamName])) {
494
  // Determine Actual MaxMind Value(s) for Attribute
514
  }
515
  }
516
 
517
+ // Custom property
518
  if (!empty($attr['property']) && (!empty($attr['property_value']) || !empty($attr['not_property_value'])) ) {
519
+ $subConditionMatching = false;
520
  try {
521
  $actualValue = geoip_detect2_shortcode_get_property($info, $attr['property']);
522
 
527
  $subConditionMatching = ! geoip_detect2_shortcode_check_subcondition($attr['not_property_value'], $actualValue);
528
  }
529
  } catch (\Exception $e) {
530
+ // Invalid Property or so... ignore.
531
  }
532
 
533
  $isConditionMatching = $isConditionMatching && $subConditionMatching;
vendor/composer/ca-bundle/res/cacert.pem CHANGED
@@ -1,7 +1,7 @@
1
  ##
2
  ## Bundle of CA Root Certificates
3
  ##
4
- ## Certificate data from Mozilla as of: Wed Mar 7 04:12:06 2018 GMT
5
  ##
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
14
  ## Just configure this file as the SSLCACertificateFile.
15
  ##
16
  ## Conversion done with mk-ca-bundle.pl version 1.27.
17
- ## SHA256: 704f02707ec6b4c4a7597a8c6039b020def11e64f3ef0605a9c3543d48038a57
18
  ##
19
 
20
 
@@ -2635,30 +2635,6 @@ kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
2635
  ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
2636
  -----END CERTIFICATE-----
2637
 
2638
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
2639
- ====================================================
2640
- -----BEGIN CERTIFICATE-----
2641
- MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN
2642
- BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
2643
- bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg
2644
- RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw
2645
- ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w
2646
- SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE
2647
- n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp
2648
- ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
2649
- CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537
2650
- jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m
2651
- ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP
2652
- 9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV
2653
- 4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH
2654
- HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
2655
- hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo
2656
- BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
2657
- URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl
2658
- lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8
2659
- B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU=
2660
- -----END CERTIFICATE-----
2661
-
2662
  Certinomis - Root CA
2663
  ====================
2664
  -----BEGIN CERTIFICATE-----
@@ -2816,126 +2792,6 @@ GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn
2816
  dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
2817
  -----END CERTIFICATE-----
2818
 
2819
- Certplus Root CA G1
2820
- ===================
2821
- -----BEGIN CERTIFICATE-----
2822
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV4EJQeIQEQWGw9CEj
2834
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- +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
2846
- qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo=
2847
- -----END CERTIFICATE-----
2848
-
2849
- Certplus Root CA G2
2850
- ===================
2851
- -----BEGIN CERTIFICATE-----
2852
- MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT
2853
- AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x
2854
- NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0
2855
- cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA
2856
- BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN
2857
- Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD
2858
- AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud
2859
- IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV
2860
- HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl
2861
- vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw==
2862
- -----END CERTIFICATE-----
2863
-
2864
- OpenTrust Root CA G1
2865
- ====================
2866
- -----BEGIN CERTIFICATE-----
2867
- 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
- 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
- MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
2870
- 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
- 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
- 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
- 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
- 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
- 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
- 9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq
2877
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
2891
- OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx
2892
- -----END CERTIFICATE-----
2893
-
2894
- OpenTrust Root CA G2
2895
- ====================
2896
- -----BEGIN CERTIFICATE-----
2897
- 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
- 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
- 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
- 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
- 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
- Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz
2903
- 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
- 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
- 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
- 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
- 3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaHvGOz
2908
- 9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4t/bQWVyJ98LVtZR0
2909
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0
2920
- 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
2921
- u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK
2922
- -----END CERTIFICATE-----
2923
-
2924
- OpenTrust Root CA G3
2925
- ====================
2926
- -----BEGIN CERTIFICATE-----
2927
- MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT
2928
- AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X
2929
- DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w
2930
- ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA
2931
- IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B
2932
- ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB
2933
- /wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf
2934
- BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM
2935
- BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta
2936
- 3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB
2937
- -----END CERTIFICATE-----
2938
-
2939
  ISRG Root X1
2940
  ============
2941
  -----BEGIN CERTIFICATE-----
@@ -3336,3 +3192,49 @@ BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe
3336
  N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
3337
  m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
3338
  -----END CERTIFICATE-----
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##
2
  ## Bundle of CA Root Certificates
3
  ##
4
+ ## Certificate data from Mozilla as of: Wed Oct 17 03:12:10 2018 GMT
5
  ##
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
14
  ## Just configure this file as the SSLCACertificateFile.
15
  ##
16
  ## Conversion done with mk-ca-bundle.pl version 1.27.
17
+ ## SHA256: 3f875d87fee4ce3d966c69f1d6c111aa95c0143ade59e4fa24882c582bb5f0ca
18
  ##
19
 
20
 
2635
  ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
2636
  -----END CERTIFICATE-----
2637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2638
  Certinomis - Root CA
2639
  ====================
2640
  -----BEGIN CERTIFICATE-----
2792
  dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
2793
  -----END CERTIFICATE-----
2794
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2795
  ISRG Root X1
2796
  ============
2797
  -----BEGIN CERTIFICATE-----
3192
  N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
3193
  m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
3194
  -----END CERTIFICATE-----
3195
+
3196
+ GlobalSign Root CA - R6
3197
+ =======================
3198
+ -----BEGIN CERTIFICATE-----
3199
+ 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
3224
+ -----END CERTIFICATE-----
3225
+
3226
+ OISTE WISeKey Global Root GC CA
3227
+ ===============================
3228
+ -----BEGIN CERTIFICATE-----
3229
+ MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD
3230
+ SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo
3231
+ MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa
3232
+ Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL
3233
+ ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh
3234
+ bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr
3235
+ VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab
3236
+ NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
3237
+ BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E
3238
+ AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk
3239
+ AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9
3240
+ -----END CERTIFICATE-----
vendor/composer/installed.json CHANGED
@@ -106,115 +106,115 @@
106
  ]
107
  },
108
  {
109
- "name": "composer/ca-bundle",
110
- "version": "1.1.1",
111
- "version_normalized": "1.1.1.0",
112
  "source": {
113
  "type": "git",
114
- "url": "https://github.com/composer/ca-bundle.git",
115
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169"
116
  },
117
  "dist": {
118
  "type": "zip",
119
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169",
120
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169",
121
  "shasum": ""
122
  },
123
  "require": {
124
- "ext-openssl": "*",
125
- "ext-pcre": "*",
126
- "php": "^5.3.2 || ^7.0"
127
  },
128
  "require-dev": {
129
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
130
- "psr/log": "^1.0",
131
- "symfony/process": "^2.5 || ^3.0 || ^4.0"
132
  },
133
- "time": "2018-03-29T19:57:20+00:00",
134
  "type": "library",
135
- "extra": {
136
- "branch-alias": {
137
- "dev-master": "1.x-dev"
138
- }
139
- },
140
  "installation-source": "dist",
141
  "autoload": {
142
  "psr-4": {
143
- "Composer\\CaBundle\\": "src"
144
  }
145
  },
146
  "notification-url": "https://packagist.org/downloads/",
147
  "license": [
148
- "MIT"
149
  ],
150
  "authors": [
151
  {
152
- "name": "Jordi Boggiano",
153
- "email": "j.boggiano@seld.be",
154
- "homepage": "http://seld.be"
155
  }
156
  ],
157
- "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
 
158
  "keywords": [
159
- "cabundle",
160
- "cacert",
161
- "certificate",
162
- "ssl",
163
- "tls"
164
  ]
165
  },
166
  {
167
- "name": "geoip2/geoip2",
168
- "version": "v2.9.0",
169
- "version_normalized": "2.9.0.0",
170
  "source": {
171
  "type": "git",
172
- "url": "https://github.com/maxmind/GeoIP2-php.git",
173
- "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77"
174
  },
175
  "dist": {
176
  "type": "zip",
177
- "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/a807fbf65212eef5d8d2db1a1b31082b53633d77",
178
- "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77",
179
  "shasum": ""
180
  },
181
  "require": {
182
- "maxmind-db/reader": "~1.0",
183
- "maxmind/web-service-common": "~0.5",
184
- "php": ">=5.4"
185
  },
186
  "require-dev": {
187
- "friendsofphp/php-cs-fixer": "2.*",
188
- "phpunit/phpunit": "4.*",
189
- "squizlabs/php_codesniffer": "3.*"
190
  },
191
- "time": "2018-04-10T15:32:59+00:00",
192
  "type": "library",
 
 
 
 
 
193
  "installation-source": "dist",
194
  "autoload": {
195
  "psr-4": {
196
- "GeoIp2\\": "src"
197
  }
198
  },
199
  "notification-url": "https://packagist.org/downloads/",
200
  "license": [
201
- "Apache-2.0"
202
  ],
203
  "authors": [
204
  {
205
- "name": "Gregory J. Oschwald",
206
- "email": "goschwald@maxmind.com",
207
- "homepage": "http://www.maxmind.com/"
208
  }
209
  ],
210
- "description": "MaxMind GeoIP2 PHP API",
211
- "homepage": "https://github.com/maxmind/GeoIP2-php",
212
  "keywords": [
213
- "IP",
214
- "geoip",
215
- "geoip2",
216
- "geolocation",
217
- "maxmind"
218
  ]
219
  }
220
  ]
106
  ]
107
  },
108
  {
109
+ "name": "geoip2/geoip2",
110
+ "version": "v2.9.0",
111
+ "version_normalized": "2.9.0.0",
112
  "source": {
113
  "type": "git",
114
+ "url": "https://github.com/maxmind/GeoIP2-php.git",
115
+ "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77"
116
  },
117
  "dist": {
118
  "type": "zip",
119
+ "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/a807fbf65212eef5d8d2db1a1b31082b53633d77",
120
+ "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77",
121
  "shasum": ""
122
  },
123
  "require": {
124
+ "maxmind-db/reader": "~1.0",
125
+ "maxmind/web-service-common": "~0.5",
126
+ "php": ">=5.4"
127
  },
128
  "require-dev": {
129
+ "friendsofphp/php-cs-fixer": "2.*",
130
+ "phpunit/phpunit": "4.*",
131
+ "squizlabs/php_codesniffer": "3.*"
132
  },
133
+ "time": "2018-04-10T15:32:59+00:00",
134
  "type": "library",
 
 
 
 
 
135
  "installation-source": "dist",
136
  "autoload": {
137
  "psr-4": {
138
+ "GeoIp2\\": "src"
139
  }
140
  },
141
  "notification-url": "https://packagist.org/downloads/",
142
  "license": [
143
+ "Apache-2.0"
144
  ],
145
  "authors": [
146
  {
147
+ "name": "Gregory J. Oschwald",
148
+ "email": "goschwald@maxmind.com",
149
+ "homepage": "http://www.maxmind.com/"
150
  }
151
  ],
152
+ "description": "MaxMind GeoIP2 PHP API",
153
+ "homepage": "https://github.com/maxmind/GeoIP2-php",
154
  "keywords": [
155
+ "IP",
156
+ "geoip",
157
+ "geoip2",
158
+ "geolocation",
159
+ "maxmind"
160
  ]
161
  },
162
  {
163
+ "name": "composer/ca-bundle",
164
+ "version": "1.1.3",
165
+ "version_normalized": "1.1.3.0",
166
  "source": {
167
  "type": "git",
168
+ "url": "https://github.com/composer/ca-bundle.git",
169
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
170
  },
171
  "dist": {
172
  "type": "zip",
173
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
174
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
175
  "shasum": ""
176
  },
177
  "require": {
178
+ "ext-openssl": "*",
179
+ "ext-pcre": "*",
180
+ "php": "^5.3.2 || ^7.0"
181
  },
182
  "require-dev": {
183
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
184
+ "psr/log": "^1.0",
185
+ "symfony/process": "^2.5 || ^3.0 || ^4.0"
186
  },
187
+ "time": "2018-10-18T06:09:13+00:00",
188
  "type": "library",
189
+ "extra": {
190
+ "branch-alias": {
191
+ "dev-master": "1.x-dev"
192
+ }
193
+ },
194
  "installation-source": "dist",
195
  "autoload": {
196
  "psr-4": {
197
+ "Composer\\CaBundle\\": "src"
198
  }
199
  },
200
  "notification-url": "https://packagist.org/downloads/",
201
  "license": [
202
+ "MIT"
203
  ],
204
  "authors": [
205
  {
206
+ "name": "Jordi Boggiano",
207
+ "email": "j.boggiano@seld.be",
208
+ "homepage": "http://seld.be"
209
  }
210
  ],
211
+ "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
 
212
  "keywords": [
213
+ "cabundle",
214
+ "cacert",
215
+ "certificate",
216
+ "ssl",
217
+ "tls"
218
  ]
219
  }
220
  ]