Fixed some listing and stats issues. Made change to getStats() in the data abstract
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 21 Jun 2016 19:06:57 +0000 (15:06 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 21 Jun 2016 21:39:40 +0000 (17:39 -0400)
lib/GlmDataAbstract/DataAbstract.php
models/admin/members/list.php

index 866b3c1..3cbb754 100755 (executable)
@@ -3219,9 +3219,8 @@ abstract class GlmDataAbstract
     {
 
         $sql = "SELECT count(DISTINCT id) as count
-                  FROM $this->table
+                  FROM $this->table T
                  WHERE $where;";
-
         $stats = $this->wpdb->get_row($sql, ARRAY_A);
 
         if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
@@ -3281,6 +3280,7 @@ abstract class GlmDataAbstract
         if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
             $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - getList() query");
         }
+
         $list = $this->wpdb->get_results($sql, ARRAY_A);
 
         if (count($list) == 0) {
index 4f3e3fd..3a7f961 100644 (file)
@@ -120,7 +120,7 @@ class GlmMembersAdmin_members_list extends GlmDataMembers
 
         // Check if this is a request to show archived members
         if (isset($_REQUEST['filterArchived'])) {
-            $where .= " AND T.access = ".$this->config['access_numb']['Archived'];
+            $where .= " AND access = ".$this->config['access_numb']['Archived'];
             $filterArchived = true;
             $haveFilter = true;
 
@@ -247,8 +247,6 @@ class GlmMembersAdmin_members_list extends GlmDataMembers
             // If we have any entries
             if (count($list) > 0) {
                 $haveMembers = true;
-
-                $memberCount = count($list);
             }
         }