Fixed problem registering database
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 24 Feb 2016 20:08:17 +0000 (15:08 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 24 Feb 2016 20:08:17 +0000 (15:08 -0500)
index.php

index 4143566..3da07b6 100644 (file)
--- 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,