WP Statistics - Version 8.3.1

Version Description

  • This is a security update release, please update as soon as possible.
Download this release

Release Info

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

Code changes from version 8.3 to 8.3.1

includes/functions/purge.php CHANGED
@@ -67,7 +67,7 @@
67
  $historical = $wpdb->get_var( $wpdb->prepare('SELECT sum(count) FROM ' . $table_name . ' WHERE `uri` = %s AND `date` < %s', $row->uri, $date_string));
68
 
69
  // Do an update of the historical data.
70
- $uresult = $wpdb->query($wpdb->prepare('UPDATE ' . $table_prefix . 'statistics_historical SET value = value + %d WHERE `uri` = %s AND `category` = \'uri\'', $historical, $row->uri, $date_string));
71
 
72
  // If we failed it's because this is the first time we've seen this URI/pageid so let's create a historical row for it.
73
  if( $uresult == 0 ) {
67
  $historical = $wpdb->get_var( $wpdb->prepare('SELECT sum(count) FROM ' . $table_name . ' WHERE `uri` = %s AND `date` < %s', $row->uri, $date_string));
68
 
69
  // Do an update of the historical data.
70
+ $uresult = $wpdb->query($wpdb->prepare('UPDATE ' . $table_prefix . 'statistics_historical SET `value` = value + %d WHERE `uri` = %s AND `category` = \'uri\'', $historical, $row->uri, $date_string));
71
 
72
  // If we failed it's because this is the first time we've seen this URI/pageid so let's create a historical row for it.
73
  if( $uresult == 0 ) {
includes/log/exclusions.php CHANGED
@@ -8,7 +8,7 @@
8
  echo "<div class='updated settings-error'><p><strong>" . __('Attention: Exclusion are not currently set to be recorded, the results below may not reflect current statistics!', 'wp_statistics') . "</strong></p></div>";
9
  }
10
 
11
- $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = $_GET['hitdays']; } }
12
 
13
  $total_stats = $WP_Statistics->get_option( 'chart_totals' );
14
 
8
  echo "<div class='updated settings-error'><p><strong>" . __('Attention: Exclusion are not currently set to be recorded, the results below may not reflect current statistics!', 'wp_statistics') . "</strong></p></div>";
9
  }
10
 
11
+ $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = intval($_GET['hitdays']); } }
12
 
13
  $total_stats = $WP_Statistics->get_option( 'chart_totals' );
14
 
includes/log/hit-statistics.php CHANGED
@@ -8,7 +8,7 @@
8
  <h2><?php _e('Hit Statistics', 'wp_statistics'); ?></h2>
9
 
10
  <ul class="subsubsub">
11
- <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = $_GET['hitdays']; } }?>
12
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=10"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
13
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=20"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
14
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=30"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
8
  <h2><?php _e('Hit Statistics', 'wp_statistics'); ?></h2>
9
 
10
  <ul class="subsubsub">
11
+ <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = intval($_GET['hitdays']); } }?>
12
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=10"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
13
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=20"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
14
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_hits_menu&hitdays=30"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
includes/log/last-visitor.php CHANGED
@@ -5,17 +5,20 @@
5
  <?php
6
  include_once( dirname( __FILE__ ) . "/../functions/country-codes.php" );
7
 
8
- $get = array('agent', 'ip');
 
 
 
 
9
 
10
- foreach($get as $gets) {
11
- if( array_key_exists($gets, $_GET) ) {
12
- $_var = $gets;
13
- $_get = $_GET[$gets];
14
- }
15
  }
16
 
17
  if( isset( $_get ) ) {
18
- $total = $wpdb->query("SELECT * FROM `{$table_prefix}statistics_visitor` WHERE `{$_var}` LIKE '%{$_get}%'");
19
  } else {
20
  $total = $wpdb->query("SELECT * FROM `{$table_prefix}statistics_visitor`");
21
  }
@@ -39,13 +42,13 @@
39
  if($Browser == null) continue;
40
 
41
  $i++;
42
- if($_get == $Browser) { $current = 'class="current" '; } else { $current = ""; }
43
  if( $i == $Total ) { $spacer = ""; }
44
  echo "| <li><a " . $current . "href='?page=wps_visitors_menu&agent=" . $Browser . "'> " . __($Browser, 'wp_statistics') ." <span class='count'>(" . number_format_i18n(wp_statistics_useragent($Browser)) .")</span></a>" . $spacer . "</li>";
45
  }
46
  } elseif(isset($_var)) {
47
  if(isset($_get)) { $current = 'class="current" '; } else { $current = ""; }
48
- echo "| <li><a {$current} href='?page=wps_visitors_menu&{$_var}={$_get}'>{$_get} <span class='count'>({$total})</span></a></li>";
49
  }
50
  }
51
  ?>
@@ -56,7 +59,7 @@
56
  <div class="postbox">
57
  <div class="handlediv" title="<?php _e('Click to toggle', 'wp_statistics'); ?>"><br /></div>
58
  <?php if(isset($_var)) { ?>
59
- <h3 class="hndle"><span><?php _e('Search for', 'wp_statistics'); ?>: <?php echo $_get; ?></span></h3>
60
  <?php } else { ?>
61
  <h3 class="hndle"><span><?php _e('Recent Visitor Statistics', 'wp_statistics'); ?></span></h3>
62
  <?php } ?>
@@ -77,7 +80,7 @@
77
 
78
  // Retrieve MySQL data
79
  if( isset($_get) ) {
80
- $result = $wpdb->get_results("SELECT * FROM `{$table_prefix}statistics_visitor` WHERE `{$_var}` LIKE '%{$_get}%' ORDER BY `{$table_prefix}statistics_visitor`.`ID` DESC LIMIT {$start}, {$end}");
81
  } else {
82
  $result = $wpdb->get_results("SELECT * FROM `{$table_prefix}statistics_visitor` ORDER BY `{$table_prefix}statistics_visitor`.`ID` DESC LIMIT {$start}, {$end}");
83
  }
5
  <?php
6
  include_once( dirname( __FILE__ ) . "/../functions/country-codes.php" );
7
 
8
+ if( array_key_exists( 'agent', $_GET ) ) {
9
+ $_var = 'agent';
10
+ $_get = '%' . $_GET['agent'] . '%';
11
+ $title = $_GET['agent'];
12
+ }
13
 
14
+ if( array_key_exists( 'ip', $_GET ) ) {
15
+ $_var = 'ip';
16
+ $_get = '%' . $_GET['ip'] . '%';
17
+ $title = $_GET['ip'];
 
18
  }
19
 
20
  if( isset( $_get ) ) {
21
+ $total = $wpdb->query($wpdb->prepare("SELECT * FROM `{$table_prefix}statistics_visitor` WHERE `{$_var}` LIKE %s", $_get));
22
  } else {
23
  $total = $wpdb->query("SELECT * FROM `{$table_prefix}statistics_visitor`");
24
  }
42
  if($Browser == null) continue;
43
 
44
  $i++;
45
+ if($title == $Browser) { $current = 'class="current" '; } else { $current = ""; }
46
  if( $i == $Total ) { $spacer = ""; }
47
  echo "| <li><a " . $current . "href='?page=wps_visitors_menu&agent=" . $Browser . "'> " . __($Browser, 'wp_statistics') ." <span class='count'>(" . number_format_i18n(wp_statistics_useragent($Browser)) .")</span></a>" . $spacer . "</li>";
48
  }
49
  } elseif(isset($_var)) {
50
  if(isset($_get)) { $current = 'class="current" '; } else { $current = ""; }
51
+ echo "| <li><a {$current} href='?page=wps_visitors_menu&{$_var}={$_get}'>{$title} <span class='count'>({$total})</span></a></li>";
52
  }
53
  }
54
  ?>
59
  <div class="postbox">
60
  <div class="handlediv" title="<?php _e('Click to toggle', 'wp_statistics'); ?>"><br /></div>
61
  <?php if(isset($_var)) { ?>
62
+ <h3 class="hndle"><span><?php _e('Search for', 'wp_statistics'); ?>: <?php echo $title; ?></span></h3>
63
  <?php } else { ?>
64
  <h3 class="hndle"><span><?php _e('Recent Visitor Statistics', 'wp_statistics'); ?></span></h3>
65
  <?php } ?>
80
 
81
  // Retrieve MySQL data
82
  if( isset($_get) ) {
83
+ $result = $wpdb->get_results($wpdb->prepare("SELECT * FROM `{$table_prefix}statistics_visitor` WHERE `{$_var}` LIKE %s ORDER BY `{$table_prefix}statistics_visitor`.`ID` DESC LIMIT {$start}, {$end}", $_get));
84
  } else {
85
  $result = $wpdb->get_results("SELECT * FROM `{$table_prefix}statistics_visitor` ORDER BY `{$table_prefix}statistics_visitor`.`ID` DESC LIMIT {$start}, {$end}");
86
  }
includes/log/page-statistics.php CHANGED
@@ -18,8 +18,8 @@
18
  $daysToDisplay = 20;
19
 
20
  if( array_key_exists('hitdays',$_GET) ) {
21
- if( $_GET['hitdays'] > 0 ) {
22
- $daysToDisplay = $_GET['hitdays'];
23
  }
24
  }
25
 
@@ -29,7 +29,7 @@
29
  <h2><?php echo __('Page Trend for Post ID', 'wp_statistics') . ' ' . $pageid . ' - ' . $title; ?></h2>
30
 
31
  <ul class="subsubsub">
32
- <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = $_GET['hitdays']; } }?>
33
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=10<?php echo $urlfields;?>"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
34
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=20<?php echo $urlfields;?>"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
35
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=30<?php echo $urlfields;?>"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
18
  $daysToDisplay = 20;
19
 
20
  if( array_key_exists('hitdays',$_GET) ) {
21
+ if( intval($_GET['hitdays']) > 0 ) {
22
+ $daysToDisplay = intval($_GET['hitdays']);
23
  }
24
  }
25
 
29
  <h2><?php echo __('Page Trend for Post ID', 'wp_statistics') . ' ' . $pageid . ' - ' . $title; ?></h2>
30
 
31
  <ul class="subsubsub">
32
+ <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET) ) { if( intval($_GET['hitdays']) > 0 ) { $daysToDisplay = intval($_GET['hitdays']); } }?>
33
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=10<?php echo $urlfields;?>"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
34
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=20<?php echo $urlfields;?>"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
35
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_pages_menu&hitdays=30<?php echo $urlfields;?>"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
includes/log/search-statistics.php CHANGED
@@ -11,7 +11,7 @@
11
  <h2><?php _e('Search Engine Referral Statistics', 'wp_statistics'); ?></h2>
12
 
13
  <ul class="subsubsub">
14
- <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET)) { if( $_GET['hitdays'] > 0 ) { $daysToDisplay = $_GET['hitdays']; } } ?>
15
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=10"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
16
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=20"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
17
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=30"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
11
  <h2><?php _e('Search Engine Referral Statistics', 'wp_statistics'); ?></h2>
12
 
13
  <ul class="subsubsub">
14
+ <?php $daysToDisplay = 20; if( array_key_exists('hitdays',$_GET)) { if( intval($_GET['hitdays']) > 0 ) { $daysToDisplay = intval($_GET['hitdays']); } } ?>
15
  <li class="all"><a <?php if($daysToDisplay == 10) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=10"><?php _e('10 Days', 'wp_statistics'); ?></a></li>
16
  | <li class="all"><a <?php if($daysToDisplay == 20) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=20"><?php _e('20 Days', 'wp_statistics'); ?></a></li>
17
  | <li class="all"><a <?php if($daysToDisplay == 30) { echo 'class="current"'; } ?>href="?page=wps_searches_menu&hitdays=30"><?php _e('30 Days', 'wp_statistics'); ?></a></li>
includes/log/top-pages.php CHANGED
@@ -161,7 +161,7 @@
161
 
162
  echo "<div class='log-page-title'>{$count} - {$uri[3]}</div>";
163
  echo "<div class='right-div'>".__('Visits', 'wp_statistics').": <a href='?page=wps_pages_menu&page-uri={$uri[0]}'>" . number_format_i18n($uri[1]) . "</a></div>";
164
- echo "<div class='left-div'><a dir='ltr' href='{$site_url}{$uri[0]}'>".urldecode($uri[0])."</a></div>";
165
  echo "</div>";
166
  }
167
 
161
 
162
  echo "<div class='log-page-title'>{$count} - {$uri[3]}</div>";
163
  echo "<div class='right-div'>".__('Visits', 'wp_statistics').": <a href='?page=wps_pages_menu&page-uri={$uri[0]}'>" . number_format_i18n($uri[1]) . "</a></div>";
164
+ echo "<div class='left-div'><a dir='ltr' href='{$site_url}{$uri[0]}'>".htmlentities(urldecode($uri[0]))."</a></div>";
165
  echo "</div>";
166
  }
167
 
includes/log/top-referring.php CHANGED
@@ -9,14 +9,15 @@
9
  </script>
10
  <?php
11
  if( array_key_exists('referr',$_GET) ) {
12
- $referr = esc_sql( $_GET['referr'] );
 
13
  }
14
  else {
15
  $referr = '';
16
  }
17
 
18
  if( $referr ) {
19
- $total = $wpdb->query("SELECT `referred` FROM `{$table_prefix}statistics_visitor` WHERE `referred` LIKE '%" . esc_sql($referr) . "%'");
20
  } else {
21
  $total = $wpdb->query("SELECT `referred` FROM `{$table_prefix}statistics_visitor` WHERE referred <> ''");
22
  }
@@ -27,7 +28,7 @@
27
  <ul class="subsubsub">
28
  <li class="all"><a <?php if(!$referr) { echo 'class="current"'; } ?>href="?page=wps_referers_menu"><?php _e('All', 'wp_statistics'); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
29
  <?php if($referr) { ?>
30
- | <li><a class="current" href="?page=wps_referers_menu&referr=<?php echo $referr; ?>"> <?php echo $referr; ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
31
  <?php } ?>
32
  </ul>
33
  <div class="postbox-container" id="last-log">
9
  </script>
10
  <?php
11
  if( array_key_exists('referr',$_GET) ) {
12
+ $referr = '%' . $_GET['referr'] . '%';
13
+ $title = $_GET['referr'];
14
  }
15
  else {
16
  $referr = '';
17
  }
18
 
19
  if( $referr ) {
20
+ $total = $wpdb->query($wpdb->prepare("SELECT `referred` FROM `{$table_prefix}statistics_visitor` WHERE `referred` LIKE %s", $referr));
21
  } else {
22
  $total = $wpdb->query("SELECT `referred` FROM `{$table_prefix}statistics_visitor` WHERE referred <> ''");
23
  }
28
  <ul class="subsubsub">
29
  <li class="all"><a <?php if(!$referr) { echo 'class="current"'; } ?>href="?page=wps_referers_menu"><?php _e('All', 'wp_statistics'); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
30
  <?php if($referr) { ?>
31
+ | <li><a class="current" href="?page=wps_referers_menu&referr=<?php echo $referr; ?>"> <?php echo $title; ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
32
  <?php } ?>
33
  </ul>
34
  <div class="postbox-container" id="last-log">
includes/log/widgets/pages.php CHANGED
@@ -28,7 +28,7 @@
28
 
29
  echo "<div class='log-page-title'>{$i} - {$uri[3]}</div>";
30
  echo "<div class='right-div'>".__('Visits', 'wp_statistics').": <a href='?page=wps_pages_menu&page-uri={$uri[0]}'>" . number_format_i18n($uri[1]) . "</a></div>";
31
- echo "<div class='left-div'><a dir='ltr' href='{$uri[0]}'>".urldecode($uri[0])."</a></div>";
32
  echo "</div>";
33
 
34
  if( $i > 9 ) { break; }
28
 
29
  echo "<div class='log-page-title'>{$i} - {$uri[3]}</div>";
30
  echo "<div class='right-div'>".__('Visits', 'wp_statistics').": <a href='?page=wps_pages_menu&page-uri={$uri[0]}'>" . number_format_i18n($uri[1]) . "</a></div>";
31
+ echo "<div class='left-div'><a dir='ltr' href='{$uri[0]}'>".htmlentities(urldecode($uri[0]))."</a></div>";
32
  echo "</div>";
33
 
34
  if( $i > 9 ) { break; }
includes/optimization/delete-agents.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  if($agent) {
10
 
11
- $result = $wpdb->query("DELETE FROM {$table_prefix}statistics_visitor WHERE agent = '$agent'");
12
 
13
  if($result) {
14
  echo sprintf(__('%s agent data deleted successfully.', 'wp_statistics'), '<code>' . $agent . '</code>');
8
 
9
  if($agent) {
10
 
11
+ $result = $wpdb->query($wpdb->prepare("DELETE FROM {$table_prefix}statistics_visitor WHERE `agent` = %s", $agent ));
12
 
13
  if($result) {
14
  echo sprintf(__('%s agent data deleted successfully.', 'wp_statistics'), '<code>' . $agent . '</code>');
includes/optimization/delete-platforms.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  if($platform) {
10
 
11
- $result = $wpdb->query("DELETE FROM {$table_prefix}statistics_visitor WHERE platform = '$platform'");
12
 
13
  if($result) {
14
  echo sprintf(__('%s platform data deleted successfully.', 'wp_statistics'), '<code>' . $platform . '</code>');
8
 
9
  if($platform) {
10
 
11
+ $result = $wpdb->query($wpdb->prepare("DELETE FROM {$table_prefix}statistics_visitor WHERE `platform` = %s", $platform));
12
 
13
  if($result) {
14
  echo sprintf(__('%s platform data deleted successfully.', 'wp_statistics'), '<code>' . $platform . '</code>');
includes/optimization/wps-optimization.php CHANGED
@@ -6,14 +6,14 @@
6
  wp_die(__('Access denied!', 'wp_statistics'));
7
 
8
  if( array_key_exists( 'populate', $_GET ) ) {
9
- if( $_GET['populate'] == 1 ) {
10
  require_once( plugin_dir_path( __FILE__ ) . '../functions/geoip-populate.php' );
11
  echo wp_statistics_populate_geoip_info();
12
  }
13
  }
14
 
15
  if( array_key_exists( 'hash-ips', $_GET ) ) {
16
- if( $_GET['hash-ips'] == 1 ) {
17
  // Generate a random salt
18
  $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
19
  $randomString = '';
@@ -45,7 +45,7 @@
45
  }
46
 
47
  if( array_key_exists( 'install', $_GET ) ) {
48
- if( $_GET['install'] == 1 ) {
49
  $WPS_Installed = "1.0";
50
  include( plugin_dir_path( __FILE__ ) . "../../wps-install.php" );
51
  echo "<div class='updated settings-error'><p><strong>" . __('Install routine complete.', 'wp_statistics') . "</strong></p></div>";
@@ -53,7 +53,7 @@
53
  }
54
 
55
  if( array_key_exists( 'index', $_GET ) ) {
56
- if( $_GET['index'] == 1 ) {
57
  // Check the number of index's on the visitors table, if it's only 5 we need to check for duplicate entries and remove them
58
  $result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip'");
59
 
6
  wp_die(__('Access denied!', 'wp_statistics'));
7
 
8
  if( array_key_exists( 'populate', $_GET ) ) {
9
+ if( intval($_GET['populate']) == 1 ) {
10
  require_once( plugin_dir_path( __FILE__ ) . '../functions/geoip-populate.php' );
11
  echo wp_statistics_populate_geoip_info();
12
  }
13
  }
14
 
15
  if( array_key_exists( 'hash-ips', $_GET ) ) {
16
+ if( intval($_GET['hash-ips']) == 1 ) {
17
  // Generate a random salt
18
  $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
19
  $randomString = '';
45
  }
46
 
47
  if( array_key_exists( 'install', $_GET ) ) {
48
+ if( intval($_GET['install']) == 1 ) {
49
  $WPS_Installed = "1.0";
50
  include( plugin_dir_path( __FILE__ ) . "../../wps-install.php" );
51
  echo "<div class='updated settings-error'><p><strong>" . __('Install routine complete.', 'wp_statistics') . "</strong></p></div>";
53
  }
54
 
55
  if( array_key_exists( 'index', $_GET ) ) {
56
+ if( intval($_GET['index']) == 1 ) {
57
  // Check the number of index's on the visitors table, if it's only 5 we need to check for duplicate entries and remove them
58
  $result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip'");
59
 
manual/manual.php CHANGED
@@ -36,6 +36,6 @@
36
 
37
 
38
  } else {
39
- wp_die(sprintf(__('Invalid file type selected: %s', 'wp_statistics'), $type), false, array('back_link' => true));
40
  }
41
  ?>
36
 
37
 
38
  } else {
39
+ wp_die(sprintf(__('Invalid file type selected: %s', 'wp_statistics'), htmlentities($type)), false, array('back_link' => true));
40
  }
41
  ?>
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.0
7
- Stable tag: 8.3
8
  License: GPL2
9
 
10
  Complete statistics for your WordPress site.
@@ -208,8 +208,8 @@ You can manually disable plugins in WordPress by simply renaming the folder they
208
  10. View latest search engine referrers Statistics page.
209
 
210
  == Upgrade Notice ==
211
- = 8.1.1 =
212
- * If you have enabled browscap.ini, please go to Statistics->Settings->browscap and download the browscap.ini file manually.
213
 
214
  = 8.0 =
215
  * PHP 5.3 is now required for WP Statistics! DO NOT UPGRADE TO 8.0 IF YOU ARE RUNNING AN OLDER VERSION!
@@ -217,6 +217,11 @@ You can manually disable plugins in WordPress by simply renaming the folder they
217
  * 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.
218
 
219
  == Changelog ==
 
 
 
 
 
220
  = 8.3 =
221
  * Added: Sanity checks for file size and results to browscap.ini updates, if the new cache file size is wrong or it mis-identifies a common real browser as a crawler the update will be rolled back.
222
  * Added: Option to e-mail a report on browscap.ini, database pruning, upgrades and GeoIP database updates.
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.0
7
+ Stable tag: 8.3.1
8
  License: GPL2
9
 
10
  Complete statistics for your WordPress site.
208
  10. View latest search engine referrers Statistics page.
209
 
210
  == Upgrade Notice ==
211
+ = 8.3.1 =
212
+ * This is a security update release, please update as soon as possible.
213
 
214
  = 8.0 =
215
  * PHP 5.3 is now required for WP Statistics! DO NOT UPGRADE TO 8.0 IF YOU ARE RUNNING AN OLDER VERSION!
217
  * 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.
218
 
219
  == Changelog ==
220
+ = 8.3.1 =
221
+ * Updated: Various SQL code clean ups.
222
+ * Updated: Varioud data validation clean ups.
223
+ * Updated: Various data output encoding updates, thanks Marc.
224
+
225
  = 8.3 =
226
  * Added: Sanity checks for file size and results to browscap.ini updates, if the new cache file size is wrong or it mis-identifies a common real browser as a crawler the update will be rolled back.
227
  * Added: Option to e-mail a report on browscap.ini, database pruning, upgrades and GeoIP database updates.
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.3
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.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);
3
  Plugin Name: WP Statistics
4
  Plugin URI: http://wp-statistics.com/
5
  Description: Complete statistics for your WordPress site.
6
+ Version: 8.3.1
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.3.1');
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);