Slimstat Analytics - Version 3.6.7

Version Description

  • [Fix] Foreach warning was being displayed, related to the latest browscap update. Sorry for the inconvenience, folks!
Download this release

Release Info

Developer coolmann
Plugin Icon 128x128 Slimstat Analytics
Version 3.6.7
Comparing to
See all releases

Code changes from version 3.6.6 to 3.6.7

Files changed (3) hide show
  1. admin/wp-slimstat-admin.php +17 -16
  2. readme.txt +5 -2
  3. wp-slimstat.php +9 -9
admin/wp-slimstat-admin.php CHANGED
@@ -7,9 +7,20 @@ class wp_slimstat_admin{
7
  public static $current_tab = 1;
8
  public static $faulty_fields = array();
9
 
10
- protected static $admin_notice = <<<EOF
11
- <div class="fixed-height">
12
- <p>In order to protect our intellectual property rights (<a href="http://www.youtube.com/watch?v=OeU-RrjolCw" target="_blank">Keyword Swarm</a>, anyone?), we are asking you to review the following terms of use.</p>
 
 
 
 
 
 
 
 
 
 
 
13
  <p><strong>GNU General Public License v2</strong></p>
14
  <ol>
15
  <li>You may copy and distribute verbatim copies of WP SlimStat's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of WP SlimStat a copy of this License along with WP SlimStat. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</li>
@@ -41,27 +52,17 @@ class wp_slimstat_admin{
41
  <li>The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
42
  Each version is given a distinguishing version number.</li>
43
  <li>If you wish to incorporate parts of WP SlimStat into other free programs whose distribution conditions are different, <strong>write to the author to ask for permission</strong>. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</li>
44
- <li><strong>NO WARRANTY</strong> - BECAUSE WP SLIMSTAT IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR WP SLIMSTAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE WP SLIMSTAT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF WP SLIMSTAT IS WITH YOU. SHOULD WP SLIMSTAT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</li>
45
  <li>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE WP SLIMSTAT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE WP SLIMSTAT (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF WP SLIMSTAT TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</li>
46
  </ol>
47
 
48
  <p><strong>Third Party Text Links</strong></p>
49
  <p>Third party text networks supply text for display in WP SlimStat. These networks may collect your IP addresses, in native or hashed forms, for purposes of controlling the distribution of text links. WP SlimStat collects anonymous aggregated usage statistics.</p>
50
- <p>By clicking the link here below ("I acknowledge that I have read and agree to the above Terms and Conditions") you agree to the terms and conditions and give permission to place text links on your website when search engine crawlers access it. Your website's layout, performance and interaction with human visitors should not be altered or affected in any way. Please note that this feature can be deactivated at any time under Setting > Advanced > UAN Netword, without impact on any other feature available in WP SlimStat.</p>
51
  <p>Copyright &copy; 2014 Get Used to IT.</p>
52
  </div>
53
 
54
- <div><a id='slimstat-enable-ads-toggle' href='#'>I acknowledge that I have read and agree to the above Terms and Conditions</a></div>
55
- EOF;
56
-
57
- /**
58
- * Init -- Sets things up.
59
- */
60
- public static function init(){
61
- // This option requires a special treatment
62
- if (!empty($_POST['options']['use_separate_menu'])){
63
- wp_slimstat::$options['use_separate_menu'] = in_array($_POST['options']['use_separate_menu'], array('yes','no'))?$_POST['options']['use_separate_menu']:'';
64
- }
65
 
66
  // Current screen
67
  if (!empty($_GET['page'])){
7
  public static $current_tab = 1;
8
  public static $faulty_fields = array();
9
 
10
+ protected static $admin_notice = '';
11
+
12
+ /**
13
+ * Init -- Sets things up.
14
+ */
15
+ public static function init(){
16
+ // This option requires a special treatment
17
+ if (!empty($_POST['options']['use_separate_menu'])){
18
+ wp_slimstat::$options['use_separate_menu'] = in_array($_POST['options']['use_separate_menu'], array('yes','no'))?$_POST['options']['use_separate_menu']:'';
19
+ }
20
+
21
+ self::$admin_notice = "
22
+ <div class=\"fixed-height\">
23
+ <p>In order to protect our intellectual property rights (<a href=\"http://www.youtube.com/watch?v=OeU-RrjolCw\" target=\"_blank\">Keyword Swarm</a>, anyone?), we are asking you to review the following terms of use.</p>
24
  <p><strong>GNU General Public License v2</strong></p>
25
  <ol>
26
  <li>You may copy and distribute verbatim copies of WP SlimStat's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of WP SlimStat a copy of this License along with WP SlimStat. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</li>
52
  <li>The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
53
  Each version is given a distinguishing version number.</li>
54
  <li>If you wish to incorporate parts of WP SlimStat into other free programs whose distribution conditions are different, <strong>write to the author to ask for permission</strong>. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</li>
55
+ <li><strong>NO WARRANTY</strong> - BECAUSE WP SLIMSTAT IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR WP SLIMSTAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE WP SLIMSTAT \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF WP SLIMSTAT IS WITH YOU. SHOULD WP SLIMSTAT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</li>
56
  <li>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE WP SLIMSTAT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE WP SLIMSTAT (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF WP SLIMSTAT TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</li>
57
  </ol>
58
 
59
  <p><strong>Third Party Text Links</strong></p>
60
  <p>Third party text networks supply text for display in WP SlimStat. These networks may collect your IP addresses, in native or hashed forms, for purposes of controlling the distribution of text links. WP SlimStat collects anonymous aggregated usage statistics.</p>
61
+ <p>By clicking the link here below (\"I acknowledge that I have read and agree to the above Terms and Conditions\") you agree to the terms and conditions and give permission to place text links on your website when search engine crawlers access it. Your website's layout, performance and interaction with human visitors should not be altered or affected in any way. Please note that this feature can be deactivated at any time under Setting > Advanced > UAN Netword, without impact on any other feature available in WP SlimStat.</p>
62
  <p>Copyright &copy; 2014 Get Used to IT.</p>
63
  </div>
64
 
65
+ <div><a id='slimstat-enable-ads-toggle' href='#'>I acknowledge that I have read and agree to the above Terms and Conditions</a></div>";
 
 
 
 
 
 
 
 
 
 
66
 
67
  // Current screen
68
  if (!empty($_GET['page'])){
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: coolmann
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BNJR5EZNY3W38
4
  Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
5
  Requires at least: 3.8
6
- Tested up to: 3.9
7
- Stable tag: 3.6.6
8
 
9
  == Description ==
10
  Visit our [website](http://slimstat.getused.to.it/) for more information, or find us on [GitHub](https://github.com/getusedtoit/wp-slimstat) (psst, we have Flattr enabled, there: star our project to donate).
@@ -271,6 +271,9 @@ foreach ($results...`
271
 
272
  == Changelog ==
273
 
 
 
 
274
  = 3.6.6 =
275
  * [New] Top Traffic Sources is now showing the percentage of direct pageviews (thank you, [uewinfo_frm](http://wordpress.org/support/topic/top-traffic-sources-to-add-direct-access))
276
  * [Update] [Browscap](http://browscap.org/) has been updated to version 5031, released on July 2, 2014
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BNJR5EZNY3W38
4
  Tags: analytics, tracking, reports, analyze, wassup, geolocation, online users, spider, tracker, pageviews, stats, maxmind, statistics, statpress
5
  Requires at least: 3.8
6
+ Tested up to: 4.0
7
+ Stable tag: 3.6.7
8
 
9
  == Description ==
10
  Visit our [website](http://slimstat.getused.to.it/) for more information, or find us on [GitHub](https://github.com/getusedtoit/wp-slimstat) (psst, we have Flattr enabled, there: star our project to donate).
271
 
272
  == Changelog ==
273
 
274
+ = 3.6.7 =
275
+ * [Fix] Foreach warning was being displayed, related to the latest browscap update. Sorry for the inconvenience, folks!
276
+
277
  = 3.6.6 =
278
  * [New] Top Traffic Sources is now showing the percentage of direct pageviews (thank you, [uewinfo_frm](http://wordpress.org/support/topic/top-traffic-sources-to-add-direct-access))
279
  * [Update] [Browscap](http://browscap.org/) has been updated to version 5031, released on July 2, 2014
wp-slimstat.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP SlimStat
4
  Plugin URI: http://wordpress.org/plugins/wp-slimstat/
5
  Description: The leading web analytics plugin for WordPress
6
- Version: 3.6.6
7
  Author: Camu
8
  Author URI: http://slimstat.getused.to.it/
9
  */
@@ -11,7 +11,7 @@ Author URI: http://slimstat.getused.to.it/
11
  if (!empty(wp_slimstat::$options)) return true;
12
 
13
  class wp_slimstat{
14
- public static $version = '3.6.6';
15
  public static $options = array();
16
 
17
  public static $wpdb = '';
@@ -688,7 +688,7 @@ class wp_slimstat{
688
  return $browser;
689
  }
690
 
691
- foreach ($browscap_patterns as $pattern => $pattern_data){
692
  if (preg_match($pattern . 'i', $_SERVER['HTTP_USER_AGENT'], $matches)){
693
  if (1 == count($matches)) {
694
  $key = $pattern_data;
@@ -716,23 +716,23 @@ class wp_slimstat{
716
  self::_preg_unquote($pattern, $simple_match ? false : $matches)
717
  );
718
 
719
- $search = $value = $search + unserialize($browscap_browsers[$key]);
720
 
721
  while (array_key_exists(3, $value)) {
722
- $value = unserialize($browscap_browsers[$value[3]]);
723
  $search += $value;
724
  }
725
 
726
  if (!empty($search[3])) {
727
- $search[3] = $browscap_userAgents[$search[3]];
728
  }
729
 
730
  break;
731
  }
732
  }
733
- unset($browscap_browsers);
734
- unset($browscap_userAgents);
735
- unset($browscap_patterns);
736
 
737
  if (!empty($search) && $search[5] != 'Default Browser' && $search[5] != 'unknown'){
738
  $browser['browser'] = $search[5];
3
  Plugin Name: WP SlimStat
4
  Plugin URI: http://wordpress.org/plugins/wp-slimstat/
5
  Description: The leading web analytics plugin for WordPress
6
+ Version: 3.6.7
7
  Author: Camu
8
  Author URI: http://slimstat.getused.to.it/
9
  */
11
  if (!empty(wp_slimstat::$options)) return true;
12
 
13
  class wp_slimstat{
14
+ public static $version = '3.6.7';
15
  public static $options = array();
16
 
17
  public static $wpdb = '';
688
  return $browser;
689
  }
690
 
691
+ foreach ($patterns as $pattern => $pattern_data){
692
  if (preg_match($pattern . 'i', $_SERVER['HTTP_USER_AGENT'], $matches)){
693
  if (1 == count($matches)) {
694
  $key = $pattern_data;
716
  self::_preg_unquote($pattern, $simple_match ? false : $matches)
717
  );
718
 
719
+ $search = $value = $search + unserialize($browsers[$key]);
720
 
721
  while (array_key_exists(3, $value)) {
722
+ $value = unserialize($browsers[$value[3]]);
723
  $search += $value;
724
  }
725
 
726
  if (!empty($search[3])) {
727
+ $search[3] = $userAgents[$search[3]];
728
  }
729
 
730
  break;
731
  }
732
  }
733
+ unset($browsers);
734
+ unset($userAgents);
735
+ unset($patterns);
736
 
737
  if (!empty($search) && $search[5] != 'Default Browser' && $search[5] != 'unknown'){
738
  $browser['browser'] = $search[5];