Removed more of the legacy debug code from index.php
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 17 Oct 2017 15:16:14 +0000 (11:16 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 17 Oct 2017 15:17:30 +0000 (11:17 -0400)
Fixed incorrect regerences to $m.member in list.html filters that should be using $m.member_pointer ($m.member is a name)

index.php
views/front/members/list.html

index 651ab86..fa8a8ec 100644 (file)
--- 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 .= '<p><b>Initial plugin installation and database setup...<br>Select "Dashboard" to see new menus.</b><P>';
+
 }
 
 /*
@@ -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');
index 0e4a26c..c7c23aa 100644 (file)
      <!-- Member information displayed in map bubbles -->
         {foreach $mapItems as $m}
             <div id="map_info_{$m.id}" class="glm-hidden">
-                {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}
                     <div class="glm-member-list-image">
                         <img src="{$glmPluginMediaUrl}/images/{$settings.list_map_logo_size}/{$m.logo}">
                         </div>
                     {/if}
                 </div>
-                {apply_filters('glm-member-db-front-members-list-mapBubbleBottom', '', $m.member)}
+                {apply_filters('glm-member-db-front-members-list-mapBubbleBottom', '', $m.member_pointer)}
             </div> <!-- End of information displayed in map bubbles -->
         {/foreach}