WP Statistics - Version 8.6.3

Version Description

  • Fixed: Really fix included countries code this time.
  • Fixed: Typo in excluded hosts code.
Download this release

Release Info

Developer GregRoss
Plugin Icon 128x128 WP Statistics
Version 8.6.3
Comparing to
See all releases

Code changes from version 8.6.2 to 8.6.3

includes/classes/hits.class.php CHANGED
@@ -175,7 +175,10 @@
175
  if( !$this->exclusion_match ) {
176
  // Grab the excluded/included countries lists, force the country codes to be in upper case to match what the GeoIP code uses.
177
  $excluded_countries = explode( "\n", strtoupper($this->get_option('excluded_countries') ) );
178
- $included_countries = explode( "\n", strtoupper($this->get_option('included_countries') ) );
 
 
 
179
 
180
  // Check to see if the current location is in the excluded countries list.
181
  if( in_array( $this->location, $excluded_countries ) ) {
@@ -204,7 +207,7 @@
204
  $hostname_cache = array();
205
 
206
  // Loop through the list of hosts and look them up.
207
- foreach( $excluded_hosts as $host ) {
208
  if( strpos( $host, '.' ) > 0 ) {
209
  // We add the extra period to the end of the host name to make sure we don't append the local dns suffix to the resolution cycle.
210
  $hostname_cache[$host] = gethostbyname( $host . ".");
175
  if( !$this->exclusion_match ) {
176
  // Grab the excluded/included countries lists, force the country codes to be in upper case to match what the GeoIP code uses.
177
  $excluded_countries = explode( "\n", strtoupper($this->get_option('excluded_countries') ) );
178
+ $included_countries_string = trim( strtoupper($this->get_option('included_countries') ) );
179
+
180
+ // We need to be really sure this isn't an empty string or explode will return an array with one entry instead of none.
181
+ if( $included_countries_string == '' ) { $included_countries = array(); } else { $included_countries = explode( "\n", $included_countries_string ); }
182
 
183
  // Check to see if the current location is in the excluded countries list.
184
  if( in_array( $this->location, $excluded_countries ) ) {
207
  $hostname_cache = array();
208
 
209
  // Loop through the list of hosts and look them up.
210
+ foreach( $excluded_host as $host ) {
211
  if( strpos( $host, '.' ) > 0 ) {
212
  // We add the extra period to the end of the host name to make sure we don't append the local dns suffix to the resolution cycle.
213
  $hostname_cache[$host] = gethostbyname( $host . ".");
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mostafa-soufi.ir/donate/
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
- Stable tag: 8.6.2
8
  License: GPL2
9
 
10
  Complete statistics for your WordPress site.
@@ -210,6 +210,10 @@ BACKUP YOUR DATABASE BEFORE INSTALLING! This release alters the table structure
210
  Support for old format substitution codes in the statistics reports has been removed, the upgrade now converts them to short codes but you should verify the report content after upgrading.
211
 
212
  == Changelog ==
 
 
 
 
213
  = 8.6.2 =
214
  * Fixed: New included countries code incorrectly identified all countries as excluded.
215
 
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
+ Stable tag: 8.6.3
8
  License: GPL2
9
 
10
  Complete statistics for your WordPress site.
210
  Support for old format substitution codes in the statistics reports has been removed, the upgrade now converts them to short codes but you should verify the report content after upgrading.
211
 
212
  == Changelog ==
213
+ = 8.6.3 =
214
+ * Fixed: Really fix included countries code this time.
215
+ * Fixed: Typo in excluded hosts code.
216
+
217
  = 8.6.2 =
218
  * Fixed: New included countries code incorrectly identified all countries as excluded.
219
 
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Statistics
4
  Plugin URI: http://wp-statistics.com/
5
  Description: Complete statistics for your WordPress site.
6
- Version: 8.6.2
7
  Author: Mostafa Soufi & Greg Ross
8
  Author URI: http://wp-statistics.com/
9
  Text Domain: wp_statistics
@@ -17,7 +17,7 @@ License: GPL2
17
  }
18
 
19
  // These defines are used later for various reasons.
20
- define('WP_STATISTICS_VERSION', '8.6.2');
21
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
22
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
23
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
3
  Plugin Name: WP Statistics
4
  Plugin URI: http://wp-statistics.com/
5
  Description: Complete statistics for your WordPress site.
6
+ Version: 8.6.3
7
  Author: Mostafa Soufi & Greg Ross
8
  Author URI: http://wp-statistics.com/
9
  Text Domain: wp_statistics
17
  }
18
 
19
  // These defines are used later for various reasons.
20
+ define('WP_STATISTICS_VERSION', '8.6.3');
21
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
22
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
23
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);