Version Description
Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
Download this release
Release Info
Developer | GregRoss |
Plugin | WP Statistics |
Version | 9.6.1 |
Comparing to | |
See all releases |
Code changes from version 9.6 to 9.6.1
includes/optimization/tabs/wps-optimization-database.php
CHANGED
@@ -27,14 +27,17 @@
|
|
27 |
|
28 |
<td>
|
29 |
<?php
|
30 |
-
GLOBAL $wpdb;
|
31 |
$wp_prefix = $wpdb->prefix;
|
|
|
|
|
32 |
|
33 |
// 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
|
34 |
$result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip_agent'");
|
35 |
|
36 |
// Note, the result will be the number of fields contained in the index, so in our case 5.
|
37 |
if( $result != 5 ) {
|
|
|
38 |
?>
|
39 |
<input id="index-submit" class="button button-primary" type="button" value="<?php _e('Update Now!', 'wp_statistics'); ?>" name="index-submit" onclick="location.href=document.URL+'&index=1&tab=database'">
|
40 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visitors table in a corner case. Newer installs protect against this with a unique index on the table. To create the index on the older installs duplicate entries must be deleted first. Clicking "Update Now" will scan the vistitors table, delete duplicate entries and add the index.', 'wp_statistics'); ?></p>
|
@@ -42,6 +45,7 @@
|
|
42 |
<?php
|
43 |
}
|
44 |
else {
|
|
|
45 |
?>
|
46 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visitors table in a corner case. Newer installs protect against this with a unique index on the table.', 'wp_statistics'); ?></p>
|
47 |
<p class="description"><?php _e('Congratulations, your installation is already up to date, nothing to do.', 'wp_statistics'); ?></p>
|
@@ -65,6 +69,7 @@
|
|
65 |
|
66 |
// Note, the result will be the number of fields contained in the index, so in our case 1.
|
67 |
if( $result != 1 ) {
|
|
|
68 |
?>
|
69 |
<input id="visits-submit" class="button button-primary" type="button" value="<?php _e('Update Now!', 'wp_statistics'); ?>" name="visit-submit" onclick="location.href=document.URL+'&visits=1&tab=database'">
|
70 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visits table in a corner case. Newer installs protect against this with a unique index on the table. To create the index on the older installs duplicate entries must be deleted first. Clicking "Update Now" will scan the vistits table, delete duplicate entries and add the index.', 'wp_statistics'); ?></p>
|
@@ -72,11 +77,14 @@
|
|
72 |
<?php
|
73 |
}
|
74 |
else {
|
|
|
75 |
?>
|
76 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visits table in a corner case. Newer installs protect against this with a unique index on the table.', 'wp_statistics'); ?></p>
|
77 |
<p class="description"><?php _e('Congratulations, your installation is already up to date, nothing to do.', 'wp_statistics'); ?></p>
|
78 |
<?php
|
79 |
}
|
|
|
|
|
80 |
?>
|
81 |
</td>
|
82 |
|
@@ -92,8 +100,6 @@
|
|
92 |
</th>
|
93 |
<td>
|
94 |
<?php
|
95 |
-
GLOBAL $WP_Statistics;
|
96 |
-
|
97 |
// Note, the result will be the number of fields contained in the index, so in our case 1.
|
98 |
if( $WP_Statistics->get_option('search_converted') != 1 ) {
|
99 |
?>
|
27 |
|
28 |
<td>
|
29 |
<?php
|
30 |
+
GLOBAL $wpdb, $WP_Statistics;
|
31 |
$wp_prefix = $wpdb->prefix;
|
32 |
+
|
33 |
+
$dbupdates = $WP_Statistics->get_option('pending_db_updates');
|
34 |
|
35 |
// 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
|
36 |
$result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip_agent'");
|
37 |
|
38 |
// Note, the result will be the number of fields contained in the index, so in our case 5.
|
39 |
if( $result != 5 ) {
|
40 |
+
$dbupdates['date_ip_agent'] = true;
|
41 |
?>
|
42 |
<input id="index-submit" class="button button-primary" type="button" value="<?php _e('Update Now!', 'wp_statistics'); ?>" name="index-submit" onclick="location.href=document.URL+'&index=1&tab=database'">
|
43 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visitors table in a corner case. Newer installs protect against this with a unique index on the table. To create the index on the older installs duplicate entries must be deleted first. Clicking "Update Now" will scan the vistitors table, delete duplicate entries and add the index.', 'wp_statistics'); ?></p>
|
45 |
<?php
|
46 |
}
|
47 |
else {
|
48 |
+
$dbupdates['date_ip_agent'] = false;
|
49 |
?>
|
50 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visitors table in a corner case. Newer installs protect against this with a unique index on the table.', 'wp_statistics'); ?></p>
|
51 |
<p class="description"><?php _e('Congratulations, your installation is already up to date, nothing to do.', 'wp_statistics'); ?></p>
|
69 |
|
70 |
// Note, the result will be the number of fields contained in the index, so in our case 1.
|
71 |
if( $result != 1 ) {
|
72 |
+
$dbupdates['unique_date'] = true;
|
73 |
?>
|
74 |
<input id="visits-submit" class="button button-primary" type="button" value="<?php _e('Update Now!', 'wp_statistics'); ?>" name="visit-submit" onclick="location.href=document.URL+'&visits=1&tab=database'">
|
75 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visits table in a corner case. Newer installs protect against this with a unique index on the table. To create the index on the older installs duplicate entries must be deleted first. Clicking "Update Now" will scan the vistits table, delete duplicate entries and add the index.', 'wp_statistics'); ?></p>
|
77 |
<?php
|
78 |
}
|
79 |
else {
|
80 |
+
$dbupdates['unique_date'] = false;
|
81 |
?>
|
82 |
<p class="description"><?php _e('Older installs of WP Statistics allow for duplicate entries in the visits table in a corner case. Newer installs protect against this with a unique index on the table.', 'wp_statistics'); ?></p>
|
83 |
<p class="description"><?php _e('Congratulations, your installation is already up to date, nothing to do.', 'wp_statistics'); ?></p>
|
84 |
<?php
|
85 |
}
|
86 |
+
|
87 |
+
$WP_Statistics->update_option('pending_db_updates', $dbupdates);
|
88 |
?>
|
89 |
</td>
|
90 |
|
100 |
</th>
|
101 |
<td>
|
102 |
<?php
|
|
|
|
|
103 |
// Note, the result will be the number of fields contained in the index, so in our case 1.
|
104 |
if( $WP_Statistics->get_option('search_converted') != 1 ) {
|
105 |
?>
|
includes/optimization/wps-optimization.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
GLOBAL $wpdb;
|
3 |
$wp_prefix = $wpdb->prefix;
|
4 |
|
5 |
if( !is_super_admin() )
|
@@ -89,7 +89,7 @@
|
|
89 |
// Record in the options that we've done this update.
|
90 |
$dbupdates = $WP_Statistics->get_option('pending_db_updates');
|
91 |
$dbupdates['date_ip_agent'] = false;
|
92 |
-
$
|
93 |
}
|
94 |
}
|
95 |
}
|
@@ -130,7 +130,7 @@
|
|
130 |
// Record in the options that we've done this update.
|
131 |
$dbupdates = $WP_Statistics->get_option('pending_db_updates');
|
132 |
$dbupdates['unique_date'] = false;
|
133 |
-
$
|
134 |
}
|
135 |
}
|
136 |
}
|
1 |
<?php
|
2 |
+
GLOBAL $wpdb, $WP_Statistics;
|
3 |
$wp_prefix = $wpdb->prefix;
|
4 |
|
5 |
if( !is_super_admin() )
|
89 |
// Record in the options that we've done this update.
|
90 |
$dbupdates = $WP_Statistics->get_option('pending_db_updates');
|
91 |
$dbupdates['date_ip_agent'] = false;
|
92 |
+
$WP_Statistics->update_option('pending_db_updates', $dbupdates);
|
93 |
}
|
94 |
}
|
95 |
}
|
130 |
// Record in the options that we've done this update.
|
131 |
$dbupdates = $WP_Statistics->get_option('pending_db_updates');
|
132 |
$dbupdates['unique_date'] = false;
|
133 |
+
$WP_Statistics->update_option('pending_db_updates', $dbupdates);
|
134 |
}
|
135 |
}
|
136 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wp-statistics.com/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.3
|
7 |
-
Stable tag: 9.6
|
8 |
License: GPL3
|
9 |
|
10 |
Complete statistics for your WordPress site.
|
@@ -235,6 +235,9 @@ If you still have issues open a new thread on the support forum and we'll try an
|
|
235 |
10. View latest search engine referrers Statistics page.
|
236 |
|
237 |
== Upgrade Notice ==
|
|
|
|
|
|
|
238 |
= 9.6 =
|
239 |
Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
|
240 |
|
@@ -282,6 +285,11 @@ BACKUP YOUR DATABASE BEFORE INSTALLING! This release alters the table structure
|
|
282 |
This release updates some core code to do with timezones, hence the change to version 9.0, if you see any issues with timezones, please let us know. In addition, you may see an increase in your visits count as a race condition that dropped some visits has been resolved.
|
283 |
|
284 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
285 |
= 9.6 =
|
286 |
* Release Date: September 3, 2015
|
287 |
* Added: New admin notices for if the database requires 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.3
|
7 |
+
Stable tag: 9.6.1
|
8 |
License: GPL3
|
9 |
|
10 |
Complete statistics for your WordPress site.
|
235 |
10. View latest search engine referrers Statistics page.
|
236 |
|
237 |
== Upgrade Notice ==
|
238 |
+
= 9.6.1 =
|
239 |
+
Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
|
240 |
+
|
241 |
= 9.6 =
|
242 |
Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
|
243 |
|
285 |
This release updates some core code to do with timezones, hence the change to version 9.0, if you see any issues with timezones, please let us know. In addition, you may see an increase in your visits count as a race condition that dropped some visits has been resolved.
|
286 |
|
287 |
== Changelog ==
|
288 |
+
= 9.6.1 =
|
289 |
+
* Release Date: September 4, 2015
|
290 |
+
* Fixed: Error with undeclared global $WP_Statistics when updating the database.
|
291 |
+
* Added: Re-validation of the current database updates required when loading the optimization page.
|
292 |
+
|
293 |
= 9.6 =
|
294 |
* Release Date: September 3, 2015
|
295 |
* Added: New admin notices for if the database requires 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: 9.6
|
7 |
Author: Mostafa Soufi & Greg Ross
|
8 |
Author URI: http://wp-statistics.com/
|
9 |
Text Domain: wp_statistics
|
@@ -12,7 +12,7 @@ License: GPL2
|
|
12 |
*/
|
13 |
|
14 |
// These defines are used later for various reasons.
|
15 |
-
define('WP_STATISTICS_VERSION', '9.6');
|
16 |
define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
|
17 |
define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
|
18 |
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: 9.6.1
|
7 |
Author: Mostafa Soufi & Greg Ross
|
8 |
Author URI: http://wp-statistics.com/
|
9 |
Text Domain: wp_statistics
|
12 |
*/
|
13 |
|
14 |
// These defines are used later for various reasons.
|
15 |
+
define('WP_STATISTICS_VERSION', '9.6.1');
|
16 |
define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
|
17 |
define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
|
18 |
define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
|
wps-install.php
CHANGED
@@ -165,7 +165,7 @@
|
|
165 |
update_option('wp_statistics_db_version', WP_STATISTICS_VERSION);
|
166 |
|
167 |
// Now check to see what database updates may be required and record them for a user notice later.
|
168 |
-
$dbupdates = array();
|
169 |
|
170 |
// 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
|
171 |
$result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip_agent'");
|
165 |
update_option('wp_statistics_db_version', WP_STATISTICS_VERSION);
|
166 |
|
167 |
// Now check to see what database updates may be required and record them for a user notice later.
|
168 |
+
$dbupdates = array( 'date_ip_agent' => false, 'unique_date' => false );
|
169 |
|
170 |
// 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
|
171 |
$result = $wpdb->query("SHOW INDEX FROM {$wp_prefix}statistics_visitor WHERE Key_name = 'date_ip_agent'");
|