From: Chuck Scott Date: Wed, 24 Feb 2016 20:08:17 +0000 (-0500) Subject: Fixed problem registering database X-Git-Tag: v1.0.0^2~170^2~9 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6a9422f583564d36f7c033f7e13ead64f0ee239b;p=WP-Plugins%2Fglm-member-db-events.git Fixed problem registering database --- diff --git a/index.php b/index.php index 4143566..3da07b6 100644 --- a/index.php +++ b/index.php @@ -136,12 +136,10 @@ if (version_compare($glmMembersDatabasePluginVersion, GLM_MEMBERS_EVENTS_PLUGIN_ /* * Register this add-on with the main GLM Member DB plugin and get information on all add-ons loaded. */ -require_once(GLM_MEMBERS_EVENTS_PLUGIN_SETUP_PATH.'/validActions.php'); -require_once(GLM_MEMBERS_EVENTS_PLUGIN_SETUP_PATH.'/shortcodes.php'); -$havePluginDatabase = false; +require_once GLM_MEMBERS_EVENTS_PLUGIN_SETUP_PATH.'/validActions.php'; +require_once GLM_MEMBERS_EVENTS_PLUGIN_SETUP_PATH.'/shortcodes.php'; if (is_file(GLM_MEMBERS_EVENTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) { - require_once(GLM_MEMBERS_EVENTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php'); - $havePluginDatabase = true; + require_once GLM_MEMBERS_EVENTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php'; } // Load Events Management Settings data @@ -166,7 +164,7 @@ function glmMembersRegisterEvents($addOns) { ); // If we have database tables for this plugin/addon, provide that data also - if ($GLOBALS['havePluginDatabase']) { + if (isset($GLOBALS['glmMembersEventsDbVersions'])) { $addOns[GLM_MEMBERS_EVENTS_PLUGIN_SLUG]['database'] = array( 'dbPrefix' => GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX, 'dbCurrentVersion' => GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION,