Update for cache notices
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 1 Oct 2019 18:09:40 +0000 (14:09 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 1 Oct 2019 18:09:40 +0000 (14:09 -0400)
only cache if not currently being activated.

classes/GlmServerStats.php
index.php
readme.txt

index bb7df65..31c0862 100644 (file)
@@ -135,6 +135,10 @@ class GlmServerStats
      */
     public function updateCache()
     {
+        // Prevent this from running on activation of this plugin.
+        if ( class_exists( 'glmServerStatsPluginActivate' ) ) {
+            return false;
+        }
         // If the update transient exists don't get anything from the relay.
         if ( false === ( get_transient( 'ServerStatCacheUpdate' ) ) ) {
             if ( GLM_SERVERSTATS_PLUGIN_DEBUG ) {
index c43aa92..cb55607 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Bandwidth
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Website Bandwidth Display and Reporting
- * Version: 4.1.6
+ * Version: 4.1.7
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmServerStats
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 4.1.6
+ * @version 4.1.7
  */
 
 // Check that we're being called by WordPress.
@@ -28,7 +28,7 @@ if (!defined('ABSPATH')) {
     die();
 }
 
-define('GLM_SERVERSTATS_PLUGIN_VERSION', '4.1.6');
+define('GLM_SERVERSTATS_PLUGIN_VERSION', '4.1.7');
 
 define('GLM_SERVERSTATS_PLUGIN_DB_VERSION', '0.0.1');
 
index 879a0cf..7740fec 100755 (executable)
@@ -29,7 +29,10 @@ e.g.
 1. Activate the plugin through the 'Plugins' menu in WordPress
 
 == Changelog ==
-= 4.1.5 =
+= 4.1.7 =
+* Update so it is not trying to get the cache if plugin is being activated.
+
+= 4.1.6 =
 * Comment out add cron minute function.
 
 = 4.1.5 =