From 37d34fd6b5704af1f9d16a6755b9008696bdb027 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 17 Oct 2017 11:16:14 -0400 Subject: [PATCH] Removed more of the legacy debug code from index.php Fixed incorrect regerences to $m.member in list.html filters that should be using $m.member_pointer ($m.member is a name) --- index.php | 29 ++++++----------------------- views/front/members/list.html | 4 ++-- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/index.php b/index.php index 651ab869..fa8a8ec3 100644 --- a/index.php +++ b/index.php @@ -351,7 +351,7 @@ require_once GLM_MEMBERS_PLUGIN_PATH . '/classes/glmPluginSupport.php'; require_once GLM_MEMBERS_PLUGIN_PATH . '/lib/smartyTemplateSupport.php'; -// Check all database tables for all registered add-ons, allow install/update +// Check all database tables for all registered add-ons, allow install/update, and add various items if (glmCheckDatabase('install')) { // If we have addons @@ -419,23 +419,13 @@ if (function_exists('is_user_logged_in')) { /* * - * Determine which controller to load + * Run desired controller * */ -// If the call to this code is to display a separate debug window -// Depreciating debug feature -/* -if (isset($_REQUEST['glmDebugWindow']) && $_REQUEST['glmDebugWindow'] == true) { - glmMembersAdminNotices(true); - exit; -} -*/ - -// If no database version was set at the top, this was an initial activation, so don't run controllers +// If a database version exists, select the desired controller if ($glmMembersDatabaseDbVersion) { - // Otherwise select appropriate controller if (is_admin()) { require_once GLM_MEMBERS_PLUGIN_PATH . '/controllers/admin.php'; new glmMembersAdmin($wpdb, $config); @@ -444,10 +434,12 @@ if ($glmMembersDatabaseDbVersion) { new glmMembersFront($wpdb, $config); } +// Otherwise, this must be an initial setup of this plugin, so don't run controller } else { // Inital setup so notify the user that they need to reload to see the admin menus $startupNotices .= '

Initial plugin installation and database setup...
Select "Dashboard" to see new menus.

'; + } /* @@ -462,16 +454,6 @@ if ($startupNotices != '') { add_action('admin_notices','glmMembersWordpressAdminNotices'); } -// If not doing debug, then clear all of the debug messages that might have been saved -// Depreciating debug feature -/* -if (defined('GLM_MEMBERS_PLUGIN_ADMIN_DEBUG') && !GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { - delete_option('glmMembersAdminNoticeAlerts'); - delete_option('glmMembersAdminNotices'); - delete_option('glmMembersAdminNoticeProcess'); - delete_option('glmMembersAdminNoticeDataBlocks'); -} -*/ /* * Check if database is installed and if it matches the current version @@ -708,6 +690,7 @@ function glmCheckDatabase () // If there was any serious error with the database for this add-on if ($db_error) { + // Deactivate this add-on include_once ABSPATH . 'wp-admin/includes/plugin.php'; deactivate_plugins($a['slug'].'/index.php'); diff --git a/views/front/members/list.html b/views/front/members/list.html index 0e4a26c1..c7c23aa8 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -115,7 +115,7 @@ {foreach $mapItems as $m}

- {apply_filters('glm-member-db-front-members-list-mapBubbleTop', '', $m.member)} + {apply_filters('glm-member-db-front-members-list-mapBubbleTop', '', $m.member_pointer)} {if $m.logo && $settings.list_map_show_logo}
@@ -187,7 +187,7 @@
{/if}
- {apply_filters('glm-member-db-front-members-list-mapBubbleBottom', '', $m.member)} + {apply_filters('glm-member-db-front-members-list-mapBubbleBottom', '', $m.member_pointer)} {/foreach} -- 2.17.1