Added support for add-on database tables - not used yet in this plugin.
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 2 Dec 2015 16:03:16 +0000 (11:03 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 2 Dec 2015 16:03:16 +0000 (11:03 -0500)
defines.php
glm-member-db-contacts.php

index a59bbfe..64e8573 100644 (file)
@@ -11,6 +11,11 @@ define('GLM_MEMBERS_CONTACTS_PLUGIN_NAME', 'Gaslight Media Members Database Cont
 define('GLM_MEMBERS_CONTACTS_PLUGIN_SHORT_NAME', 'Contacts');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_SLUG', 'glm-member-db-contacts');
 
+// Database table prefixes
+global $wpdb;
+define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX', $wpdb->prefix.'glm_members_');
+
+
 // Determine which system we're running on - If not provided, assume PRODUCTION
 $host = getenv('GLM_HOST_ID');
 if (trim($host) == '') {
@@ -41,15 +46,11 @@ define('GLM_MEMBERS_CONTACTS_PLUGIN_MEDIA_URL', $WPUploadDir['baseurl'].'/'.GLM_
 
 // Directories
 define('GLM_MEMBERS_CONTACTS_PLUGIN_PATH', dirname(__FILE__));
-define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_SCRIPTS', dirname(__FILE__).'/misc/databaseScripts');
+define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_SCRIPTS', dirname(__FILE__).'/setup/databaseScripts');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH', GLM_MEMBERS_CONTACTS_PLUGIN_PATH.'/classes');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_CONFIG_PATH', GLM_MEMBERS_CONTACTS_PLUGIN_PATH.'/config');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_SETUP_PATH', GLM_MEMBERS_CONTACTS_PLUGIN_PATH.'/setup');
 
-// Database table prefixes
-global $wpdb;
-define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX', $wpdb->prefix.'glm_members_');
-
 
 // Parameters related to the Main GLM Member DB plugin - Depending on what's going on these may already defined by the main plugin
 $pluginsPath = str_replace(GLM_MEMBERS_CONTACTS_PLUGIN_SLUG, '', GLM_MEMBERS_CONTACTS_PLUGIN_PATH);
index 84ed45f..9653b89 100644 (file)
@@ -124,6 +124,7 @@ if (version_compare($glmMembersDatabasePluginVersion, GLM_MEMBERS_CONTACTS_PLUGI
  * Register this add-on with the main GLM Member DB plugin and get information on all add-ons loaded.
  */
 require_once(GLM_MEMBERS_CONTACTS_PLUGIN_SETUP_PATH.'/validActions.php');
+// require_once(GLM_MEMBERS_CONTACTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php');
 function glmMembersRegisterContacts($addOns) {
 
     // Add this add-on to the add-ons array
@@ -132,7 +133,8 @@ function glmMembersRegisterContacts($addOns) {
             'name' =>  GLM_MEMBERS_CONTACTS_PLUGIN_NAME,
             'short_name' => GLM_MEMBERS_CONTACTS_PLUGIN_SHORT_NAME,
             'slug' => GLM_MEMBERS_CONTACTS_PLUGIN_SLUG,
-            'actions' => $GLOBALS['glmMembersContactsAddOnValidActions']
+            'actions' => $GLOBALS['glmMembersContactsAddOnValidActions'],
+            'database' => false
     );
 
     // Return the array with our data added