Made compatible with receint changes to database setup proceedures
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 7 Jun 2016 17:09:21 +0000 (13:09 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 7 Jun 2016 17:09:21 +0000 (13:09 -0400)
index.php

index 87454b0..d9fc27c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -85,9 +85,14 @@ require_once('defines.php');
 require_once(ABSPATH . 'wp-includes/pluggable.php');
 
 /*
- * Do some checks to make sure the main GLM Member DB is active and of a recceint enough version
+ * Do some preliminary sanity checks
  */
 
+// Check if database version should be defined and it isn't - This would be a plugin/add-on setup issue
+if (is_file(GLM_MEMBERS_EVENTS_PLUGIN_PATH.'/setup/databaseScripts/dbVersions.php') && !defined('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION')) {
+    die('You have database scripts but have not defined a current database version at the top of index.php for this plugin/add-on!');
+}
+
 // Function to generate message regarding main GLM Member DB plugin not installed and active
 function glmMembersEventsPluginRequired() {
     echo '