From d2f0d741638267d269f9d21d2959a76bdf53fbb7 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 20 Sep 2019 11:27:06 -0400 Subject: [PATCH] Added missing global reference to $wpdb causing activation failures. --- index.php | 7 ++++--- readme.txt | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 5fea8d8..28d5c3c 100755 --- 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.1 + * Version: 4.1.2 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmServerStats * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 4.1.1 + * @version 4.1.2 */ // Check that we're being called by WordPress. @@ -28,7 +28,7 @@ if (!defined('ABSPATH')) { die(); } -define('GLM_SERVERSTATS_PLUGIN_VERSION', '4.1.1'); +define('GLM_SERVERSTATS_PLUGIN_VERSION', '4.1.2'); define('GLM_SERVERSTATS_PLUGIN_DB_VERSION', '0.0.1'); @@ -44,6 +44,7 @@ require_once GLM_SERVERSTATS_PLUGIN_LIB_PATH.'/smartyTemplateSupport.php'; // Grab the database class require_once GLM_SERVERSTATS_PLUGIN_PATH . '/classes/GlmServerStats.php'; +global $wpdb; $serverStatsDb = new GlmServerStats( $wpdb ); // Connect to bandwidth database and get all settings for this site diff --git a/readme.txt b/readme.txt index c8e066b..a4c5784 100755 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: Gaslight Media,Plugin,ServerStats Author: Gaslight Media Author URL: http://www.gaslightmedia.com Plugin URL: http://www.gaslightmedia.com -Requires at least: 4.1.1 +Requires at least: 4.1.2 Tested up to: 5.2.3 Stable tag: 5.0.2 License: GPLv2 or later @@ -29,6 +29,9 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += 4.1.2 = +* Fixed problem with connecting to WordPress database on activation + = 4.1.0 = * Website selection table for provider now more browser and font compliant * Cleaned up appearance of E-Mail summary list sent to billing. -- 2.17.1