require_once GLM_SERVERSTATS_PLUGIN_LIB_PATH.'/smartyTemplateSupport.php';
// Connect to bandwidth database and get all settings for this site
-$bwdb = mysqli_init();
+$bwdb = false;
$websiteSettings = bandwidthDataConnect(GLM_SERVERSTATS_PLUGIN_HOSTNAME);
if (!$websiteSettings) {
wp_die('FAILURE: Unable to connect to GLM Bandwidth database. Please check connection settings in defines.php of this plugin.');
*/
function bandwidthDataConnect($website = false)
{
+ // Moved msqli_init() to here to be compatible with activation
global $bwdb;
+ $bwdb = mysqli_init();
$settings = false;